Idris2Doc : IotaTime.Period

IotaTime.Period

(source)

Definitions

recordPeriod : Type->Type
  A calendar-relative amount applicable to `target`.
The constructor is hidden so unit capabilities cannot be bypassed.

Totality: total
Visibility: export
Constructor: 
MkPeriod : Integer->Integer->Integer->Integer->Integer->Integer->Integer->Integer->Periodtarget

Projections:
.storedDays : Periodtarget->Integer
.storedHours : Periodtarget->Integer
.storedMinutes : Periodtarget->Integer
.storedMonths : Periodtarget->Integer
.storedNanoseconds : Periodtarget->Integer
.storedSeconds : Periodtarget->Integer
.storedWeeks : Periodtarget->Integer
.storedYears : Periodtarget->Integer

Hints:
Eq (Periodtarget)
Monoid (Periodtarget)
Semigroup (Periodtarget)
Show (Periodtarget)
periodYears : Periodtarget->Integer
Totality: total
Visibility: export
periodMonths : Periodtarget->Integer
Totality: total
Visibility: export
periodWeeks : Periodtarget->Integer
Totality: total
Visibility: export
periodDays : Periodtarget->Integer
Totality: total
Visibility: export
periodHours : Periodtarget->Integer
Totality: total
Visibility: export
periodMinutes : Periodtarget->Integer
Totality: total
Visibility: export
periodSeconds : Periodtarget->Integer
Totality: total
Visibility: export
periodNanoseconds : Periodtarget->Integer
Totality: total
Visibility: export
interfaceHasCalendar : Type->Type
  Types with calendar-relative date fields.

Parameters: target
Methods:
0calendarCapability : ()

Implementation: 
HasCalendar (CalendarDateTimecalendar)
0calendarCapability : HasCalendartarget=> ()
Totality: total
Visibility: public export
interfaceHasTime : Type->Type
  Types with local time-of-day fields.

Parameters: target
Methods:
0timeCapability : ()

Implementations:
HasTime (CalendarDateTimecalendar)
HasTimeLocalTime
0timeCapability : HasTimetarget=> ()
Totality: total
Visibility: public export
interfaceApplyPeriod : Type->Type
  Library-owned types to which periods can be applied. The internal target
capability seals this interface against client implementations.

Parameters: target
Constraints: PeriodTarget target
Methods:
applyPeriod : Periodtarget->target->target
  Apply all components of a period using iotaTime's rules for the target.

For calendar dates, components apply from largest to smallest: years,
months, weeks, then days. Year and month shifts clamp an invalid day to
the target month's final day; every shift also clamps at the concrete
calendar's supported boundaries. Weeks are seven-day shifts. Components
combined with `<+>` are aggregated before this sequence, so
`months 1 <+> months 1` applies one two-month shift rather than two
separately clamped one-month shifts.

For `LocalTime`, clock components combine into one signed displacement
and wrap within the 24-hour day. For `CalendarDateTime`, date components
apply first as above, then clock components combine into one displacement
whose signed day carry adjusts the resulting date.

Implementations:
ApplyPeriod (CalendarDateTimecalendar)
ApplyPeriodLocalTime
applyPeriod : ApplyPeriodtarget=>Periodtarget->target->target
  Apply all components of a period using iotaTime's rules for the target.

For calendar dates, components apply from largest to smallest: years,
months, weeks, then days. Year and month shifts clamp an invalid day to
the target month's final day; every shift also clamps at the concrete
calendar's supported boundaries. Weeks are seven-day shifts. Components
combined with `<+>` are aggregated before this sequence, so
`months 1 <+> months 1` applies one two-month shift rather than two
separately clamped one-month shifts.

For `LocalTime`, clock components combine into one signed displacement
and wrap within the 24-hour day. For `CalendarDateTime`, date components
apply first as above, then clock components combine into one displacement
whose signed day carry adjusts the resulting date.

Totality: total
Visibility: public export
years : HasCalendartarget=>Integer->Periodtarget
  Construct a period measured in calendar years.

Totality: total
Visibility: public export
months : HasCalendartarget=>Integer->Periodtarget
  Construct a period measured in calendar months.

Totality: total
Visibility: public export
weeks : HasCalendartarget=>Integer->Periodtarget
  Construct a period measured in seven-day calendar weeks.

Totality: total
Visibility: public export
days : HasCalendartarget=>Integer->Periodtarget
  Construct a period measured in calendar days.

Totality: total
Visibility: public export
hours : HasTimetarget=>Integer->Periodtarget
  Construct a period measured in hours.

Totality: total
Visibility: public export
minutes : HasTimetarget=>Integer->Periodtarget
  Construct a period measured in minutes.

Totality: total
Visibility: public export
seconds : HasTimetarget=>Integer->Periodtarget
  Construct a period measured in seconds.

Totality: total
Visibility: public export
nanoseconds : HasTimetarget=>Integer->Periodtarget
  Construct a period measured in nanoseconds.

Totality: total
Visibility: public export
negatePeriod : Periodtarget->Periodtarget
  Negate every component of a period.

Totality: total
Visibility: public export
scalePeriod : Integer->Periodtarget->Periodtarget
  Multiply every component of a period by an integer.

Totality: total
Visibility: public export