API / Minn\Front / CalendarLabels

CalendarLabels final readonly class

Minn\Front\CalendarLabels · public/minn/src/Minn/Front/CalendarLabels.php · 44 lines

The words a calendar prints: weekday names Sunday first, the short form each column shows (an initial or an abbreviation), month names by number, and the abbreviation the month navigation uses.

Used by 1

Constants and properties

propreadonly array $weekdays

Promoted from the constructor.

propreadonly array $weekdayShort

Promoted from the constructor.

propreadonly array $months

Promoted from the constructor.

propreadonly array $monthAbbrev

Promoted from the constructor.

Public

new__construct(array $weekdays, array $weekdayShort, array $months, array $monthAbbrev)#
$weekdaysarray<int, string>Sunday first
$weekdayShortarray<string, string>full weekday name to the column heading
$monthsarray<int, string>1 to 12
$monthAbbrevarray<string, string>full month name to its abbreviation
staticenglish(): self#

The English tables, with weekday initials as the reference shows by default.

staticenglishAbbreviated(): self#

The English tables with three-letter weekday abbreviations.

Internals 1

Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.

privatefromEnglish(Closure $short): self#
$shortClosure(string): stringthe column heading for a weekday name