Module
Temporal.Interval.Duration
- Package
- purescript-temporal
- Repository
- philippedev101/purescript-temporal
Typeclass for computing the duration of an interval.
Provides HasDuration instances for all Temporal types that support
until', and a duration function that computes the duration of an
Interval using that typeclass.
#HasDuration Source
class HasDuration a whereTypes that support computing a Duration between two values.
Members
durationBetween :: a -> a -> Duration
Instances
#duration Source
duration :: forall a. HasDuration a => Interval a -> DurationCompute the duration of an interval using the until' function of the
contained type.
duration (unsafeInterval date1 date2) -- uses PlainDate.until'
duration (unsafeInterval zdt1 zdt2) -- uses ZonedDateTime.until' (DST-aware)
- Modules
- Temporal.
Diff - Temporal.
Display - Temporal.
Duration - Temporal.
Duration. Extra - Temporal.
Format. Html - Temporal.
Instant - Temporal.
Instant. Extra - Temporal.
Internal. Options - Temporal.
Internal. Types - Temporal.
Internal. Unsafe - Temporal.
Interval - Temporal.
Interval. Duration - Temporal.
Interval. Set - Temporal.
Now - Temporal.
PlainDate - Temporal.
PlainDate. Boundary - Temporal.
PlainDate. Extra - Temporal.
PlainDate. Weekday - Temporal.
PlainDateTime - Temporal.
PlainDateTime. Extra - Temporal.
PlainMonthDay - Temporal.
PlainTime - Temporal.
PlainTime. Extra - Temporal.
PlainYearMonth - Temporal.
PlainYearMonth. Extra - Temporal.
Predicate - Temporal.
TimeDuration - Temporal.
ZonedDateTime - Temporal.
ZonedDateTime. Boundary - Temporal.
ZonedDateTime. Extra