Autodoc
  • Namespace
  • Class
  • Tree

Namespaces

  • BlueTihi
    • Context
  • Brickrouge
    • Element
      • Nodes
    • Renderer
    • Widget
  • ICanBoogie
    • ActiveRecord
    • AutoConfig
    • CLDR
    • Composer
    • Core
    • Event
    • Exception
    • HTTP
      • Dispatcher
      • Request
    • I18n
      • Translator
    • Mailer
    • Modules
      • Taxonomy
        • Support
      • Thumbnailer
        • Versions
    • Object
    • Operation
      • Dispatcher
    • Prototype
    • Routes
    • Routing
      • Dispatcher
    • Session
  • Icybee
    • ActiveRecord
      • Model
    • ConfigOperation
    • Document
    • EditBlock
    • Element
      • ActionbarContextual
      • ActionbarSearch
      • ActionbarToolbar
    • FormBlock
    • Installer
    • ManageBlock
    • Modules
      • Articles
      • Cache
        • Collection
        • ManageBlock
      • Comments
        • ManageBlock
      • Contents
        • ManageBlock
      • Dashboard
      • Editor
        • Collection
      • Files
        • File
        • ManageBlock
      • Forms
        • Form
        • ManageBlock
      • I18n
      • Images
        • ManageBlock
      • Members
      • Modules
        • ManageBlock
      • Nodes
        • ManageBlock
        • Module
      • Pages
        • BreadcrumbElement
        • LanguagesElement
        • ManageBlock
        • NavigationBranchElement
        • NavigationElement
        • Page
        • PageController
      • Registry
      • Search
      • Seo
      • Sites
        • ManageBlock
      • Taxonomy
        • Terms
          • ManageBlock
        • Vocabulary
          • ManageBlock
      • Users
        • ManageBlock
        • NonceLogin
        • Roles
      • Views
        • ActiveRecordProvider
        • Collection
        • View
    • Operation
      • ActiveRecord
      • Constructor
      • Module
      • Widget
    • Rendering
  • None
  • Patron
  • PHP

Classes

  • Calendar
  • CalendarCollection
  • DateFormatter
  • DateTimeFormatter
  • FileCache
  • Locale
  • LocaleCollection
  • LocalizedDateTime
  • LocalizedObject
  • Provider
  • Repository
  • Retriever
  • RunTimeCache
  • Supplemental
  • TimeFormatter

Interfaces

  • Cache

Exceptions

  • ResourceNotFound

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
Extended by ICanBoogie\CLDR\TimeFormatter
Namespace: ICanBoogie\CLDR
Located at vendor/icanboogie/cldr/lib/formatters/time.php

Methods summary

protected string
# resolve_pattern( string $pattern_or_width_or_skeleton )

Resolves widths defined in timeFormats (full, long, medium, short) into a pattern.

Resolves widths defined in timeFormats (full, long, medium, short) into a pattern.

Parameters

$pattern_or_width_or_skeleton
string
$pattern_or_width_or_skeleton

Returns

string

Overrides

ICanBoogie\CLDR\DateTimeFormatter::resolve_pattern

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()

Magic methods summary

Properties summary

Properties inherited from ICanBoogie\CLDR\DateTimeFormatter

$calendar, $formatters

Magic properties inherited from ICanBoogie\CLDR\DateTimeFormatter

$calendar

Autodoc API documentation generated by ApiGen 2.8.0