package dates_calc

Build not checked
  1. Overview
  2. Docs
A date calculation library

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.0.7.tar.gz
md5=244294deee9c01082ee847d66ff1ef48
sha512=1756ed2d87f0d4d67e850de8445136d08dbcd959779f189dacbe880afdbc4c6a9ecca843f94df48181302b31ceb7faeef307179473648efbf4ffdc8d5223ec66

Description

A date calculation library, with exact operators to add a given number of days to a date, and approximate operators to add months or years.

Added to opam-repository:

README

A date calculation library

Aim

This library handles dates (YYYY-MM-DD) and periods (in days, months and years). It provides operators on dates and periods. The addition of dates and periods containing months or years is a tricky case that may require roundings. We have taken special care to define those rounding operators and expose different rounding modes for users.

This library is a work in progress. You can find the library's description in lib/dates.mli. There are also a Python and C implementations (which correspond to ports of the OCaml implementation).

The full semantics of the library has been formalized and is available in the related ESOP 2024 paper Formalizing Date Arithmetic and Statically Detecting Ambiguities for the Law.

Installation

Just run opam install dates_calc or opam install . if you've cloned the git repository.

Building the documentation

The documentation can be built with dune build @doc, and is then available in doc/odoc.html.

Dependencies (2)

  1. ocaml >= "4.11.0"
  2. dune >= "3.11"

Dev Dependencies (3)

  1. odoc with-doc
  2. qcheck with-test & >= "0.15"
  3. alcotest with-test & >= "1.5.0"

Optional Dependencies

None

Used by (1)

  1. catala >= "0.8.0" & < "1.0.0~beta"

Conflicts

None

Build status

Results of building dates_calc with each compiler on check.ci.ocaml.org, run of against opam-repository 8d8d144. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

This version is not in the latest run; the versions below are.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
0.0.10 good good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure