Points in time¶
See the clocks to learn to have access to these objects.
All examples below use the $point variable that reference an instance of Innmind\TimeContinuum\PointInTime.
Year¶
This will return the year as an int.
This returns 365 or 366 on leap years.
Month¶
This returns a value from the enum Innmind\TimeContinuum\Calendar\Month.
This returns an int between 28 and 31.
Day¶
This returns an int between 0 and 365.
This returns an int between 1 and 31.
This returns a value from the enum Innmind\TimeContinuum\Calendar\Day.
Hour¶
This returns an int between 0 and 23.
Minute¶
This returns an int between 0 and 59.
Second¶
This returns an int between 0 and 59.
Millisecond¶
This returns an int between 0 and 999.
Microsecond¶
This returns an int between 0 and 999.
Offset¶
$hours is an int between -12 and 14. $minutes is an int between 0 and 59 but usually is either 0, 15, 30 or 45.
Comparing points¶
Both methods return a bool.