Module

Temporal.PlainDate.Boundary

Package
purescript-temporal
Repository
philippedev101/purescript-temporal

Boundary / truncation functions for PlainDate.

All functions are pure PureScript — no FFI required.

#startOfWeek Source

startOfWeek :: PlainDate -> PlainDate

The Monday of the ISO week containing this date.

startOfWeek (plainDate 2024 3 20)  -- Wednesday -> Monday 2024-03-18

#endOfWeek Source

endOfWeek :: PlainDate -> PlainDate

The Sunday of the ISO week containing this date.

endOfWeek (plainDate 2024 3 20)  -- Wednesday -> Sunday 2024-03-24

#startOfMonth Source

startOfMonth :: PlainDate -> PlainDate

The first day of the month containing this date.

#endOfMonth Source

endOfMonth :: PlainDate -> PlainDate

The last day of the month containing this date.

#startOfYear Source

startOfYear :: PlainDate -> PlainDate

January 1 of the year containing this date.

#endOfYear Source

endOfYear :: PlainDate -> PlainDate

December 31 of the year containing this date.

#startOfDay Source

startOfDay :: PlainDate -> PlainDateTime

The given date at midnight (00:00:00.000000000).

#endOfDay Source

endOfDay :: PlainDate -> PlainDateTime

The given date at the last representable nanosecond (23:59:59.999999999).