Classes under this namespace make it possible to represent date/time information.
A rich set of methods is supplied to modify and format date/time information as well.
The date and time information in the DateTimeImmutable is stored as a 64-bit number so all conceivably
useful dates (including negative years) are supported.
[1]
All features follow ISO 8601 standard.
This standard provides a well-defined, method of representing calendar dates and times worldwide.
[2]
Times, Dates and Datetimes
The DateTimeImmutable and related classes allow you represent date/time information.
The objects can be created by passing in a string presentation of date/time information,
or from the current system's time.[1]
Following group of interfaces Date, Time and DateTime define addditional
getters and modifiers to native PHP datetimes.
These interfaces are implemented as immutable versions that use PHP's DateTimeImmutable instance as date data source.
The DateTimeImmutable and related classes allow you represent date/time information.
The objects can be created by passing in a string presentation of date/time information,
or from the current system's time.[1]
ISO 8601 uses the 24-hour clock system. Either the seconds, or the minutes and
seconds, may be omitted from the basic or extended time formats for greater brevity
but decreased precision. [2]
Playground defines time in Time interface with representation of DateTimeZone timezones.
Plain immutable time without dates is implemented in ImmutableTime class.
ISO Weeks and Months
An ISO week-numbering year (also called ISO year informally) has 52 or 53 full weeks.
That is 364 or 371 days instead of the usual 365 or 366 days. The extra week is
sometimes referred to as a leap week. [3]
A CalendarWeek implements a traversable seven day ISO week of a year.
CalendarUnit has two enumeration implementations. These Enumerations
localize weekday and month names. Implemented calendar unit instances can translate
its name to various language by using IntlDateFormatter.
In order to work as intended, this site stores cookies on your device. Accepting
improves our site and provides you with personalized service. Declining results
in one cookie being placed on your device so we remember your choice.