Class TimeFormatter
Time formatter.
<?php namespace ICanBoogie\CLDR; $datetime = '2013-11-05 21:22:23'; $formatter = new TimeFormatter($repository->locales['en']); echo $formatter($datetime, 'full'); // 9:22:23 PM CET echo $formatter($datetime, 'long'); // 9:22:23 PM CET echo $formatter($datetime, 'medium'); // 9:22:23 PM echo $formatter($datetime, 'short'); // 9:22 PM $formatter = new TimeFormatter($repository->locales['fr']); echo $formatter($datetime, 'full'); // 21:22:23 CET echo $formatter($datetime, 'long'); // 21:22:23 CET echo $formatter($datetime, 'medium'); // 21:22:23 echo $formatter($datetime, 'short'); // 21:22
- ICanBoogie\CLDR\DateTimeFormatter
- ICanBoogie\CLDR\TimeFormatter
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()