Module

Temporal.ZonedDateTime.Boundary

Package
purescript-temporal
Repository
philippedev101/purescript-temporal

DST-aware boundary / truncation functions for ZonedDateTime.

All functions preserve the timezone and correctly handle DST transitions. For example, startOfDay may return a non-midnight time in zones where DST transitions occur at midnight.

#startOfWeek Source

startOfWeek :: ZonedDateTime -> ZonedDateTime

The start of the Monday of the ISO week containing this ZonedDateTime. DST-aware: may not be midnight.

#endOfWeek Source

endOfWeek :: ZonedDateTime -> ZonedDateTime

The end of the Sunday of the ISO week containing this ZonedDateTime (last nanosecond of that day).

#startOfMonth Source

startOfMonth :: ZonedDateTime -> ZonedDateTime

The start of the first day of the month containing this ZonedDateTime.

#endOfMonth Source

endOfMonth :: ZonedDateTime -> ZonedDateTime

The last nanosecond of the last day of the month containing this ZonedDateTime.

#startOfYear Source

startOfYear :: ZonedDateTime -> ZonedDateTime

The start of January 1 of the year containing this ZonedDateTime.

#endOfYear Source

endOfYear :: ZonedDateTime -> ZonedDateTime

The last nanosecond of December 31 of the year containing this ZonedDateTime.