package calendar

  1. Overview
  2. Docs

Common interface for all periods.

type +'a period constraint 'a = [< date_field ]

Type of a period.

Period is an additive monoid

val empty : 'a period

The empty period.

val add : 'a period -> 'a period -> 'a period

Addition of periods.

val sub : 'a period -> 'a period -> 'a period

Substraction of periods.

val opp : 'a period -> 'a period

Opposite of a period.

Periods are comparable

val equal : 'a period -> 'b period -> bool

Equality function between two periods.

  • since 1.09.0
val compare : 'a period -> 'b period -> int

Comparison function between two periods.

val hash : 'a period -> int

Hash function for periods.

  • since 2.0