From e9928cb305467bb2b325651f3a2ec1fb04b8fa1d Mon Sep 17 00:00:00 2001 From: Claudio Zizza Date: Fri, 12 Apr 2024 00:46:05 +0200 Subject: [PATCH] Add datetime type specifier to docs --- docs/datetime.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/datetime.md b/docs/datetime.md index 04146a4..62e2cbb 100644 --- a/docs/datetime.md +++ b/docs/datetime.md @@ -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'); @@ -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