aboutsummaryrefslogtreecommitdiff
path: root/lib/kernel/date.mli
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kernel/date.mli')
-rw-r--r--lib/kernel/date.mli7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/kernel/date.mli b/lib/kernel/date.mli
index 2f632c8..0e86d54 100644
--- a/lib/kernel/date.mli
+++ b/lib/kernel/date.mli
@@ -14,6 +14,13 @@ val month : t -> int
val day : t -> int
val weekday : t -> weekday
+(** Proleptic Gregorian leap-year test: divisible by 4, except a century year
+ not divisible by 400. The same rule {!make}/{!days_in_month} already use
+ internally to admit 29 February -- exposed so a rite can key its own
+ calendar-reckoning rules (e.g. a kalends-doubling convention) off the
+ identical, single-sourced definition rather than re-deriving it. *)
+val is_leap : int -> bool
+
(** [to_rata]/[of_rata] expose the underlying day-count (days since 1970-01-01);
[of_rata] and [add_days] are unbounded total arithmetic (they may denote a
year outside 1583..9999 — only [make] enforces the domain). *)