Skip to content

Commit

Permalink
Add datetime type specifier to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
SenseException committed Apr 11, 2024
1 parent 6c355d5 commit e9928cb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/datetime.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
| quarter_name | integer, DateTime, DateTimeImmutable, IntlCalendar |
| week_of_month | integer, DateTime, DateTimeImmutable, IntlCalendar |
| week_of_year | integer, DateTime, DateTimeImmutable, IntlCalendar |
| datetime | integer, DateTime, DateTimeImmutable, IntlCalendar |

```php
$intlFormat = (new Budgegeria\IntlFormat\Factory())->createIntlFormat('en_US');
Expand Down Expand Up @@ -55,6 +56,8 @@ echo $intlFormat->format('%week_of_month', new DateTime('2016-03-01'));
// 1
echo $intlFormat->format('%week_of_year', new DateTime('2016-03-01'));
// 9
echo $intlFormat->format('%datetime', new DateTime('2016-03-01'));
// 2016-03-01 00:00:00

echo $intlFormat->format('%time_short', new DateTime());
// 01:20
Expand Down

0 comments on commit e9928cb

Please sign in to comment.