ICanBoogie
  • Documentation
  • API Reference
  • DateTime 2.0.x
Namespaces
  • ICanBoogie
    • DateTime
Classes
  • DateTimeLocalizer
  • ImmutableDateTime
  • MutableDateTime
  • TimeZone
  • TimeZoneLocation
Interfaces
  • DateTime

Class DateTimeLocalizer

Localizes DateTime instances.

Namespace: ICanBoogie
Located at DateTimeLocalizer.php

Methods summary

public static define( callable $localizer ) : callable

Defines the localizer.

Defines the localizer.

Parameters

$localizer

Returns

callable
The previous localizer, or null if none was defined.
public static defined( void ) : callable|null

Returns the current localizer.

Returns the current localizer.

Returns

callable|null
public static undefine( void )

Undefine the localizer.

Undefine the localizer.

public static localize( ICanBoogie\DateTime $datetime, string $locale = self::DEFAULT_LOCALE ) : callable

Localize a ICanBoogie\DateTime instance.

Localize a ICanBoogie\DateTime instance.

Parameters

$datetime
$locale

Returns

callable

Constants summary

DEFAULT_LOCALE : string
'en'
DateTime 2.0.x – Check on GitHub – API documentation generated by ApiGen