Civil Date PHP Package

English extends Locale
in package

English calendar localization.

Table of Contents

Constants

LANGUAGE_TAG  : string = 'en'
Language tag for English localization.

Properties

$languageTag  : string
Locale language tag containing a language and optional region.

Methods

__construct()  : mixed
Creates an English locale.
abbreviatedDayOfWeekFromName()  : DayOfWeek|null
Parses an English abbreviated day-of-week name.
abbreviatedDayOfWeekName()  : string
Formats an abbreviated day-of-week name in English.
abbreviatedEraFromName()  : Calendar|null
Parses an English abbreviated era name.
abbreviatedEraName()  : string
Formats an abbreviated era name in English.
abbreviatedMonthFromName()  : int|null
Parses an English abbreviated month name.
abbreviatedMonthName()  : string
Formats an abbreviated month name in English.
customizeFor()  : LocaleBuilder
Creates a locale builder for another language tag using this locale's behavior.
dayOfWeekFromName()  : DayOfWeek|null
Parses an English day-of-week name.
dayOfWeekName()  : string
Formats a day-of-week name in English.
eraFromName()  : Calendar|null
Parses an English era name.
eraName()  : string
Formats an era name in English.
isRightToLeft()  : bool
Returns whether English text is written right to left.
languageTag()  : string
Returns the locale language tag.
localize()  : string
Returns application-specific localized text for a custom key.
monthFromName()  : int|null
Parses an English month name.
monthName()  : string
Formats a month name in English.
numberLocalizer()  : NumberLocalizer
Returns the English number localizer.
seasonFromName()  : Season|null
Parses an English season name.
seasonName()  : string
Formats a season name in English.
textNormalizer()  : TextNormalizer
Returns the English text normalizer.

Constants

LANGUAGE_TAG

Language tag for English localization.

public string LANGUAGE_TAG = 'en'

Properties

$languageTag read-only

Locale language tag containing a language and optional region.

protected string $languageTag

Methods

__construct()

Creates an English locale.

public __construct([string $languageTag = self::LANGUAGE_TAG ]) : mixed
Parameters
$languageTag : string = self::LANGUAGE_TAG

Locale language tag.

abbreviatedMonthName()

Formats an abbreviated month name in English.

public abbreviatedMonthName(Calendar $calendar, int $month) : string
Parameters
$calendar : Calendar

Calendar identifier.

$month : int

Month number.

Tags
throws
InvalidArgumentException

If the month number is invalid for the calendar.

see
English::abbreviatedMonthFromName()
English::monthName()
Return values
string

English abbreviated month name.

customizeFor()

Creates a locale builder for another language tag using this locale's behavior.

public customizeFor(string $languageTag) : LocaleBuilder

The custom locale inherits all behavior from this locale unless the builder overrides a specific value.

Parameters
$languageTag : string

Language tag for the customized locale.

Tags
see
LocaleBuilder::build()
CustomLocale
Return values
LocaleBuilder

Locale builder initialized from this locale.

eraFromName()

Parses an English era name.

public eraFromName(string $name) : Calendar|null
Parameters
$name : string

Era name.

Tags
see
English::eraName()
Return values
Calendar|null

Matching calendar, or null when unrecognized.

isRightToLeft()

Returns whether English text is written right to left.

public isRightToLeft() : bool
Return values
bool

Always false.

languageTag()

Returns the locale language tag.

public languageTag() : string
Return values
string

Locale language tag.

localize()

Returns application-specific localized text for a custom key.

public localize(string $key) : string
Parameters
$key : string

Custom localization key.

Return values
string

Localized text, or the key when no localization is defined.

seasonFromName()

Parses an English season name.

public seasonFromName(string $name) : Season|null
Parameters
$name : string

Season name.

Tags
see
English::seasonName()
Return values
Season|null

Matching season, or null when unrecognized.

On this page

Search results