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 implements ICanBoogie\CLDR\Formatter uses ICanBoogie\Accessor\AccessorTrait (not available)
- ┗ ICanBoogie\CLDR\TimeFormatter
Methods summary
Methods inherited from ICanBoogie\CLDR\DateTimeFormatter
__construct()
,
__invoke()
,
format()
,
get_calendar()
,
resolve_width()
,
tokenize()
Constants summary
Constants inherited from ICanBoogie\CLDR\DateTimeFormatter
WIDTH_FULL
,
WIDTH_LONG
,
WIDTH_MEDIUM
,
WIDTH_SHORT