Class DateFormatter
Date formatter.
<?php namespace ICanBoogie\CLDR; $datetime = '2013-11-05 21:22:23'; $formatter = new DateFormatter($repository->locales['en']); echo $formatter($datetime, 'full'); // Tuesday, November 5, 2013 echo $formatter($datetime, 'long'); // November 5, 2013 echo $formatter($datetime, 'medium'); // Nov 5, 2013 echo $formatter($datetime, 'short'); // 11/5/13 $formatter = new DateFormatter($repository->locales['fr']); echo $formatter($datetime, 'full'); // mardi 5 novembre 2013 echo $formatter($datetime, 'long'); // 5 novembre 2013 echo $formatter($datetime, 'medium'); // 5 nov. 2013 echo $formatter($datetime, 'short'); // 05/11/2013
- ICanBoogie\CLDR\DateTimeFormatter
- ICanBoogie\CLDR\DateFormatter
Methods summary
protected
string
|
#
resolve_pattern( string $pattern_or_width_or_skeleton )
Resolves widths defined in |
Methods inherited from ICanBoogie\CLDR\DateTimeFormatter
__construct()
,
__get()
,
__invoke()
,
format()
,
format_day_in_week()
,
format_day_of_month()
,
format_day_of_week_in_month()
,
format_day_of_year()
,
format_era()
,
format_hour12()
,
format_hour24()
,
format_hour_in_day()
,
format_hour_in_period()
,
format_minutes()
,
format_month()
,
format_period()
,
format_quarter()
,
format_seconds()
,
format_standalone_month()
,
format_standalone_quarter()
,
format_timezone()
,
format_week_of_month()
,
format_week_of_year()
,
format_year()
,
tokenize()