ICanBoogie
  • Documentation
  • API Reference
  • CLDR master
Namespaces
  • ICanBoogie
    • CLDR
      • Plurals
      • Units
Classes
  • AbstractCollection
  • AbstractSectionCollection
  • Calendar
  • CalendarCollection
  • ContextTransforms
  • Currency
  • CurrencyCollection
  • CurrencyFormatter
  • DateFormatter
  • DateTimeAccessor
  • DateTimeFormatter
  • FileProvider
  • ListFormatter
  • Locale
  • LocaleCollection
  • LocalizedCurrency
  • LocalizedDateTime
  • LocalizedListFormatter
  • LocalizedLocale
  • LocalizedNumberFormatter
  • LocalizedObject
  • LocalizedObjectWithFormatter
  • LocalizedTerritory
  • Number
  • NumberFormatter
  • NumberPattern
  • NumberPatternParser
  • Numbers
  • Plurals
  • ProviderCollection
  • RedisProvider
  • Repository
  • RunTimeProvider
  • Supplemental
  • Territory
  • TerritoryCollection
  • TimeFormatter
  • Units
  • WebProvider
Interfaces
  • Exception
  • Formatter
  • LocalizeAwareInterface
  • Provider
Traits
  • CodePropertyTrait
  • CollectionTrait
  • LocalePropertyTrait
  • LocalizeTrait
  • ProviderStorageBinding
  • RepositoryPropertyTrait
Exceptions
  • ResourceNotFound
  • TerritoryNotDefined

Class LocalizedDateTime

A localized date time.

<?php

namespace ICanBoogie\CLDR;

$ldt = new LocalizedDateTime(new \DateTime('2013-11-04 20:21:22 UTC'), $repository->locales['fr']);

echo $ldt->as_full;          // lundi 4 novembre 2013 20:21:22 UTC
# or
echo $ldt->format_as_full(); // lundi 4 novembre 2013 20:21:22 UTC

echo $ldt->as_long;          // 4 novembre 2013 20:21:22 UTC
echo $ldt->as_medium;        // 4 nov. 2013 20:21:22
echo $ldt->as_short;         // 04/11/2013 20:21
ICanBoogie\CLDR\LocalizedObject uses ICanBoogie\Accessor\AccessorTrait (not available) ICanBoogie\CLDR\LocalePropertyTrait
┗ ICanBoogie\CLDR\LocalizedObjectWithFormatter
┗ ICanBoogie\CLDR\LocalizedDateTime
Namespace: ICanBoogie\CLDR
Located at LocalizedDateTime.php

Methods summary

protected lazy_get_formatter( void ) : ICanBoogie\CLDR\DateTimeFormatter

Returns the formatter.

Returns the formatter.

Returns

ICanBoogie\CLDR\DateTimeFormatter
public __get( $property )

Inheritdoc

Overrides

ICanBoogie\CLDR\LocalizedObjectWithFormatter::__get
public __set( $property, $value )

Inheritdoc

public __call( $method, $arguments )

Inheritdoc

public __toString( void )

Inheritdoc

public format( string|null $pattern = null ) : string

Parameters

$pattern

Returns

string

Inheritdoc

Methods inherited from ICanBoogie\CLDR\LocalizedObject

__construct(), from(), get_target()

Methods used from ICanBoogie\CLDR\LocalePropertyTrait

get_locale()

Magic methods summary

public format_as_full( void ) : string

format_as_full() Formats the instance according to the full datetime pattern.

format_as_full() Formats the instance according to the full datetime pattern.

Returns

string
public format_as_long( void ) : string

format_as_long() Formats the instance according to the long datetime pattern.

format_as_long() Formats the instance according to the long datetime pattern.

Returns

string
public format_as_medium( void ) : string

format_as_medium() Formats the instance according to the medium datetime pattern.

format_as_medium() Formats the instance according to the medium datetime pattern.

Returns

string
public format_as_short( void ) : string

format_as_short() Formats the instance according to the short datetime pattern.

format_as_short() Formats the instance according to the short datetime pattern.

Returns

string

Magic methods inherited from ICanBoogie\CLDR\LocalizedObjectWithFormatter

format()

Properties summary

Properties inherited from ICanBoogie\CLDR\LocalizedObject

$options, $target

Magic properties

public read-only $target : DateTimeInterface

The object to localize.

public read-only $formatter : ICanBoogie\CLDR\DateTimeFormatter
public read-only $as_full : string
public read-only $as_long : string
public read-only $as_medium : string
public read-only $as_short : string

Magic properties inherited from ICanBoogie\CLDR\LocalizedObject

$locale

Magic properties used from ICanBoogie\CLDR\LocalePropertyTrait

$locale

CLDR master – Check on GitHub – API documentation generated by ApiGen