From b7281e18312eaa8346b0d099c45d79841fc2d0aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Glondu?= Date: Wed, 1 Feb 2023 09:16:29 +0100 Subject: New upstream version 3.0.0 --- .depend | 94 - .github/CODEOWNERS | 3 + .gitignore | 4 + .travis.yml | 16 + CHANGES | 9 + Makefile | 16 + Makefile.in | 295 --- README | 113 - README.md | 78 + calendar.opam | 26 + config.status | 906 ------- configure | 3410 --------------------------- configure.in | 211 -- doc/Calendar.Precise.html | 400 ---- doc/Calendar.html | 49 - doc/Calendar_builder.Make.html | 424 ---- doc/Calendar_builder.Make_Precise.html | 422 ---- doc/Calendar_builder.html | 47 - doc/Calendar_sig.S.Date.html | 600 ----- doc/Calendar_sig.S.Period.html | 159 -- doc/Calendar_sig.S.Time.html | 216 -- doc/Calendar_sig.S.html | 400 ---- doc/Calendar_sig.html | 50 - doc/Date.html | 41 - doc/Date_sig.S.Period.html | 89 - doc/Date_sig.S.html | 598 ----- doc/Date_sig.html | 63 - doc/Fcalendar.Precise.html | 400 ---- doc/Fcalendar.html | 50 - doc/Ftime.html | 45 - doc/Period.S.html | 75 - doc/Period.html | 48 - doc/Printer.Calendar.html | 95 - doc/Printer.CalendarPrinter.html | 94 - doc/Printer.Date.html | 95 - doc/Printer.DatePrinter.html | 94 - doc/Printer.Fcalendar.html | 94 - doc/Printer.Ftime.html | 98 - doc/Printer.Precise_Calendar.html | 95 - doc/Printer.Precise_Fcalendar.html | 97 - doc/Printer.S.html | 90 - doc/Printer.Time.html | 97 - doc/Printer.TimePrinter.html | 94 - doc/Printer.html | 183 -- doc/Time.html | 41 - doc/Time_Zone.html | 105 - doc/Time_sig.S.Period.html | 90 - doc/Time_sig.S.Second.html | 56 - doc/Time_sig.S.html | 214 -- doc/Time_sig.Second.html | 56 - doc/Time_sig.html | 59 - doc/Utils.Comparable.html | 53 - doc/Utils.Float.html | 49 - doc/Utils.Int.html | 53 - doc/Utils.html | 48 - doc/Version.html | 45 - doc/index.html | 96 - doc/index_attributes.html | 33 - doc/index_class_types.html | 33 - doc/index_classes.html | 33 - doc/index_exceptions.html | 56 - doc/index_methods.html | 33 - doc/index_module_types.html | 70 - doc/index_modules.html | 220 -- doc/index_types.html | 138 -- doc/index_values.html | 1122 --------- doc/style.css | 41 - doc/type_Calendar.Precise.html | 330 --- doc/type_Calendar.html | 648 ----- doc/type_Calendar_builder.Make.html | 344 --- doc/type_Calendar_builder.Make_Precise.html | 344 --- doc/type_Calendar_builder.html | 695 ------ doc/type_Calendar_sig.S.Date.html | 26 - doc/type_Calendar_sig.S.Period.html | 91 - doc/type_Calendar_sig.S.Time.html | 26 - doc/type_Calendar_sig.S.html | 180 -- doc/type_Calendar_sig.html | 193 -- doc/type_Date.html | 141 -- doc/type_Date_sig.S.Period.html | 49 - doc/type_Date_sig.S.html | 160 -- doc/type_Date_sig.html | 171 -- doc/type_Fcalendar.Precise.html | 330 --- doc/type_Fcalendar.html | 648 ----- doc/type_Ftime.html | 99 - doc/type_Period.S.html | 45 - doc/type_Period.html | 49 - doc/type_Printer.Calendar.html | 35 - doc/type_Printer.CalendarPrinter.html | 35 - doc/type_Printer.Date.html | 35 - doc/type_Printer.DatePrinter.html | 35 - doc/type_Printer.Fcalendar.html | 35 - doc/type_Printer.Ftime.html | 35 - doc/type_Printer.Precise_Calendar.html | 35 - doc/type_Printer.Precise_Fcalendar.html | 35 - doc/type_Printer.S.html | 35 - doc/type_Printer.Time.html | 35 - doc/type_Printer.TimePrinter.html | 35 - doc/type_Printer.html | 155 -- doc/type_Time.html | 99 - doc/type_Time_Zone.html | 36 - doc/type_Time_sig.S.Period.html | 52 - doc/type_Time_sig.S.Second.html | 32 - doc/type_Time_sig.S.html | 108 - doc/type_Time_sig.Second.html | 32 - doc/type_Time_sig.html | 122 - doc/type_Utils.Comparable.html | 31 - doc/type_Utils.Float.html | 33 - doc/type_Utils.Int.html | 31 - doc/type_Utils.html | 50 - doc/type_Version.html | 26 - dune-project | 3 + src/date.ml | 19 +- src/date_sig.mli | 12 + src/dune | 14 + src/printer.ml | 18 +- src/printer.mli | 2 +- src/time_Zone.ml | 1 - src/utils.ml | 6 +- src/utils.mli | 4 +- src/version.mli | 2 - tests/dune | 9 + tests/gen_test.ml | 7 +- tests/gen_test.mli | 2 +- tests/test.ml | 31 +- tests/test_calendar.ml | 344 ++- tests/test_date.ml | 305 +-- tests/test_fcalendar.ml | 4 +- tests/test_fpcalendar.ml | 292 ++- tests/test_ftime.ml | 116 +- tests/test_pcalendar.ml | 281 ++- tests/test_printer.ml | 186 +- tests/test_time.ml | 93 +- tests/test_timezone.ml | 42 +- 133 files changed, 1072 insertions(+), 19809 deletions(-) delete mode 100644 .depend create mode 100644 .github/CODEOWNERS create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 Makefile delete mode 100644 Makefile.in delete mode 100644 README create mode 100644 README.md create mode 100644 calendar.opam delete mode 100755 config.status delete mode 100755 configure delete mode 100644 configure.in delete mode 100644 doc/Calendar.Precise.html delete mode 100644 doc/Calendar.html delete mode 100644 doc/Calendar_builder.Make.html delete mode 100644 doc/Calendar_builder.Make_Precise.html delete mode 100644 doc/Calendar_builder.html delete mode 100644 doc/Calendar_sig.S.Date.html delete mode 100644 doc/Calendar_sig.S.Period.html delete mode 100644 doc/Calendar_sig.S.Time.html delete mode 100644 doc/Calendar_sig.S.html delete mode 100644 doc/Calendar_sig.html delete mode 100644 doc/Date.html delete mode 100644 doc/Date_sig.S.Period.html delete mode 100644 doc/Date_sig.S.html delete mode 100644 doc/Date_sig.html delete mode 100644 doc/Fcalendar.Precise.html delete mode 100644 doc/Fcalendar.html delete mode 100644 doc/Ftime.html delete mode 100644 doc/Period.S.html delete mode 100644 doc/Period.html delete mode 100644 doc/Printer.Calendar.html delete mode 100644 doc/Printer.CalendarPrinter.html delete mode 100644 doc/Printer.Date.html delete mode 100644 doc/Printer.DatePrinter.html delete mode 100644 doc/Printer.Fcalendar.html delete mode 100644 doc/Printer.Ftime.html delete mode 100644 doc/Printer.Precise_Calendar.html delete mode 100644 doc/Printer.Precise_Fcalendar.html delete mode 100644 doc/Printer.S.html delete mode 100644 doc/Printer.Time.html delete mode 100644 doc/Printer.TimePrinter.html delete mode 100644 doc/Printer.html delete mode 100644 doc/Time.html delete mode 100644 doc/Time_Zone.html delete mode 100644 doc/Time_sig.S.Period.html delete mode 100644 doc/Time_sig.S.Second.html delete mode 100644 doc/Time_sig.S.html delete mode 100644 doc/Time_sig.Second.html delete mode 100644 doc/Time_sig.html delete mode 100644 doc/Utils.Comparable.html delete mode 100644 doc/Utils.Float.html delete mode 100644 doc/Utils.Int.html delete mode 100644 doc/Utils.html delete mode 100644 doc/Version.html delete mode 100644 doc/index.html delete mode 100644 doc/index_attributes.html delete mode 100644 doc/index_class_types.html delete mode 100644 doc/index_classes.html delete mode 100644 doc/index_exceptions.html delete mode 100644 doc/index_methods.html delete mode 100644 doc/index_module_types.html delete mode 100644 doc/index_modules.html delete mode 100644 doc/index_types.html delete mode 100644 doc/index_values.html delete mode 100644 doc/style.css delete mode 100644 doc/type_Calendar.Precise.html delete mode 100644 doc/type_Calendar.html delete mode 100644 doc/type_Calendar_builder.Make.html delete mode 100644 doc/type_Calendar_builder.Make_Precise.html delete mode 100644 doc/type_Calendar_builder.html delete mode 100644 doc/type_Calendar_sig.S.Date.html delete mode 100644 doc/type_Calendar_sig.S.Period.html delete mode 100644 doc/type_Calendar_sig.S.Time.html delete mode 100644 doc/type_Calendar_sig.S.html delete mode 100644 doc/type_Calendar_sig.html delete mode 100644 doc/type_Date.html delete mode 100644 doc/type_Date_sig.S.Period.html delete mode 100644 doc/type_Date_sig.S.html delete mode 100644 doc/type_Date_sig.html delete mode 100644 doc/type_Fcalendar.Precise.html delete mode 100644 doc/type_Fcalendar.html delete mode 100644 doc/type_Ftime.html delete mode 100644 doc/type_Period.S.html delete mode 100644 doc/type_Period.html delete mode 100644 doc/type_Printer.Calendar.html delete mode 100644 doc/type_Printer.CalendarPrinter.html delete mode 100644 doc/type_Printer.Date.html delete mode 100644 doc/type_Printer.DatePrinter.html delete mode 100644 doc/type_Printer.Fcalendar.html delete mode 100644 doc/type_Printer.Ftime.html delete mode 100644 doc/type_Printer.Precise_Calendar.html delete mode 100644 doc/type_Printer.Precise_Fcalendar.html delete mode 100644 doc/type_Printer.S.html delete mode 100644 doc/type_Printer.Time.html delete mode 100644 doc/type_Printer.TimePrinter.html delete mode 100644 doc/type_Printer.html delete mode 100644 doc/type_Time.html delete mode 100644 doc/type_Time_Zone.html delete mode 100644 doc/type_Time_sig.S.Period.html delete mode 100644 doc/type_Time_sig.S.Second.html delete mode 100644 doc/type_Time_sig.S.html delete mode 100644 doc/type_Time_sig.Second.html delete mode 100644 doc/type_Time_sig.html delete mode 100644 doc/type_Utils.Comparable.html delete mode 100644 doc/type_Utils.Float.html delete mode 100644 doc/type_Utils.Int.html delete mode 100644 doc/type_Utils.html delete mode 100644 doc/type_Version.html create mode 100644 dune-project create mode 100644 src/dune create mode 100644 tests/dune diff --git a/.depend b/.depend deleted file mode 100644 index 2b491b9..0000000 --- a/.depend +++ /dev/null @@ -1,94 +0,0 @@ -src/calendar.cmo : src/time.cmi src/date.cmi src/calendar_builder.cmi \ - src/calendar.cmi -src/calendar.cmx : src/time.cmx src/date.cmx src/calendar_builder.cmx \ - src/calendar.cmi -src/calendar_builder.cmo : src/utils.cmi src/time_sig.cmi src/time_Zone.cmi \ - src/period.cmi src/date_sig.cmi src/calendar_builder.cmi -src/calendar_builder.cmx : src/utils.cmx src/time_sig.cmi src/time_Zone.cmx \ - src/period.cmi src/date_sig.cmi src/calendar_builder.cmi -src/date.cmo : src/utils.cmi src/time_Zone.cmi src/period.cmi src/date.cmi -src/date.cmx : src/utils.cmx src/time_Zone.cmx src/period.cmi src/date.cmi -src/fcalendar.cmo : src/ftime.cmi src/date.cmi src/calendar_builder.cmi \ - src/fcalendar.cmi -src/fcalendar.cmx : src/ftime.cmx src/date.cmx src/calendar_builder.cmx \ - src/fcalendar.cmi -src/ftime.cmo : src/utils.cmi src/time_Zone.cmi src/period.cmi src/ftime.cmi -src/ftime.cmx : src/utils.cmx src/time_Zone.cmx src/period.cmi src/ftime.cmi -src/printer.cmo : src/utils.cmi src/time_Zone.cmi src/time.cmi \ - src/period.cmi src/ftime.cmi src/fcalendar.cmi src/date.cmi \ - src/calendar.cmi src/printer.cmi -src/printer.cmx : src/utils.cmx src/time_Zone.cmx src/time.cmx \ - src/period.cmi src/ftime.cmx src/fcalendar.cmx src/date.cmx \ - src/calendar.cmx src/printer.cmi -src/time.cmo : src/utils.cmi src/time_Zone.cmi src/period.cmi src/time.cmi -src/time.cmx : src/utils.cmx src/time_Zone.cmx src/period.cmi src/time.cmi -src/time_Zone.cmo : src/time_Zone.cmi -src/time_Zone.cmx : src/time_Zone.cmi -src/utils.cmo : src/utils.cmi -src/utils.cmx : src/utils.cmi -src/version.cmo : src/version.cmi -src/version.cmx : src/version.cmi -src/calendar.cmi : src/time.cmi src/date.cmi src/calendar_sig.cmi -src/calendar_builder.cmi : src/time_sig.cmi src/date_sig.cmi \ - src/calendar_sig.cmi -src/calendar_sig.cmi : src/time_sig.cmi src/time_Zone.cmi src/period.cmi \ - src/date_sig.cmi -src/date.cmi : src/date_sig.cmi -src/date_sig.cmi : src/period.cmi -src/fcalendar.cmi : src/ftime.cmi src/date.cmi src/calendar_sig.cmi -src/ftime.cmi : src/time_sig.cmi -src/period.cmi : -src/printer.cmi : src/time.cmi src/ftime.cmi src/fcalendar.cmi src/date.cmi \ - src/calendar.cmi -src/time.cmi : src/time_sig.cmi -src/time_Zone.cmi : -src/time_sig.cmi : src/time_Zone.cmi src/period.cmi -src/utils.cmi : -src/version.cmi : -tests/gen_test.cmo : tests/gen_test.cmi -tests/gen_test.cmx : tests/gen_test.cmi -tests/test.cmo : tests/test_timezone.cmo tests/test_time.cmo \ - tests/test_printer.cmo tests/test_pcalendar.cmo tests/test_ftime.cmo \ - tests/test_fpcalendar.cmo tests/test_fcalendar.cmo tests/test_date.cmo \ - tests/test_calendar.cmo -tests/test.cmx : tests/test_timezone.cmx tests/test_time.cmx \ - tests/test_printer.cmx tests/test_pcalendar.cmx tests/test_ftime.cmx \ - tests/test_fpcalendar.cmx tests/test_fcalendar.cmx tests/test_date.cmx \ - tests/test_calendar.cmx -tests/test_calendar.cmo : src/utils.cmi src/time_Zone.cmi src/time.cmi \ - src/period.cmi tests/gen_test.cmi src/date.cmi src/calendar.cmi -tests/test_calendar.cmx : src/utils.cmx src/time_Zone.cmx src/time.cmx \ - src/period.cmi tests/gen_test.cmx src/date.cmx src/calendar.cmx -tests/test_date.cmo : src/time_Zone.cmi src/period.cmi tests/gen_test.cmi \ - src/date.cmi -tests/test_date.cmx : src/time_Zone.cmx src/period.cmi tests/gen_test.cmx \ - src/date.cmx -tests/test_fcalendar.cmo : src/utils.cmi src/time_Zone.cmi src/time.cmi \ - src/period.cmi tests/gen_test.cmi src/fcalendar.cmi src/date.cmi -tests/test_fcalendar.cmx : src/utils.cmx src/time_Zone.cmx src/time.cmx \ - src/period.cmi tests/gen_test.cmx src/fcalendar.cmx src/date.cmx -tests/test_fpcalendar.cmo : src/utils.cmi src/time_Zone.cmi src/time.cmi \ - src/period.cmi tests/gen_test.cmi src/fcalendar.cmi src/date.cmi -tests/test_fpcalendar.cmx : src/utils.cmx src/time_Zone.cmx src/time.cmx \ - src/period.cmi tests/gen_test.cmx src/fcalendar.cmx src/date.cmx -tests/test_ftime.cmo : src/utils.cmi src/time_Zone.cmi src/period.cmi \ - tests/gen_test.cmi src/ftime.cmi -tests/test_ftime.cmx : src/utils.cmx src/time_Zone.cmx src/period.cmi \ - tests/gen_test.cmx src/ftime.cmx -tests/test_pcalendar.cmo : src/utils.cmi src/time_Zone.cmi src/time.cmi \ - src/period.cmi tests/gen_test.cmi src/date.cmi src/calendar.cmi -tests/test_pcalendar.cmx : src/utils.cmx src/time_Zone.cmx src/time.cmx \ - src/period.cmi tests/gen_test.cmx src/date.cmx src/calendar.cmx -tests/test_printer.cmo : src/utils.cmi src/time_Zone.cmi src/time.cmi \ - src/printer.cmi tests/gen_test.cmi src/ftime.cmi src/date.cmi \ - src/calendar.cmi -tests/test_printer.cmx : src/utils.cmx src/time_Zone.cmx src/time.cmx \ - src/printer.cmx tests/gen_test.cmx src/ftime.cmx src/date.cmx \ - src/calendar.cmx -tests/test_time.cmo : src/utils.cmi src/time_Zone.cmi src/time.cmi \ - src/period.cmi tests/gen_test.cmi -tests/test_time.cmx : src/utils.cmx src/time_Zone.cmx src/time.cmx \ - src/period.cmi tests/gen_test.cmx -tests/test_timezone.cmo : src/time_Zone.cmi tests/gen_test.cmi -tests/test_timezone.cmx : src/time_Zone.cmx tests/gen_test.cmx -tests/gen_test.cmi : diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..17639a5 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,3 @@ +# These are the default owners for everything in the repo. They will +# receive review requests when someone opens a pull request. +* @Drup @loxs @pmetzger diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6ed3d46 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +_build +*.install +.merlin +_opam diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..39c4609 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +language: c +install: wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-docker.sh +script: bash -ex .travis-docker.sh +services: +- docker +env: + global: + - PINS="calendar:." + - DISTRO="ubuntu-16.04" + matrix: + - PACKAGE="calendar" OCAML_VERSION="4.03" TESTS=1 EXTRA_DEPS="alcotest" + - PACKAGE="calendar" OCAML_VERSION="4.04" TESTS=1 EXTRA_DEPS="alcotest" + - PACKAGE="calendar" OCAML_VERSION="4.05" TESTS=1 EXTRA_DEPS="alcotest" + - PACKAGE="calendar" OCAML_VERSION="4.06" TESTS=1 EXTRA_DEPS="alcotest" + - PACKAGE="calendar" OCAML_VERSION="4.07" TESTS=1 EXTRA_DEPS="alcotest" + - PACKAGE="calendar" OCAML_VERSION="4.08" TESTS=1 EXTRA_DEPS="alcotest" diff --git a/CHANGES b/CHANGES index 374cf24..0e129c8 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,15 @@ Mark "*": bug fixed. Mark "!": change that can break compatibility with older version of the library =============================================================================== +version 3.0.0, 2022-10-11: +========================== +* Fix Date.week_first_last according to ISO 8601 (@balat) +* Remove incorrect time zone bound check (@vouillon) +! Switch from Str to Re (@vouillon) +! Remove date function from the version API (@c-cube) +o Add some uility function for comparing dates (@loxs) +* Switch the build-system to dune (@c-cube) + version 2.04, 2014-10-29: =========================== * [Makefile] Fix minor issues with ocamlfind and 'make install' (from diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8415928 --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ + +all: build test + +build: + @dune build @install + +clean: + @dune clean + +test: + @dune runtest --no-buffer --force + +doc: + @dune build @doc + +.PHONY: all clean test doc diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index 9eb3026..0000000 --- a/Makefile.in +++ /dev/null @@ -1,295 +0,0 @@ -########################################################################## -# # -# This file is part of Calendar. # -# # -# Copyright (C) 2003-2011 Julien Signoles # -# # -# you can redistribute it and/or modify it under the terms of the GNU # -# Lesser General Public License version 2.1 as published by the # -# Free Software Foundation, with a special linking exception (usual # -# for Objective Caml libraries). # -# # -# It is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR # -# # -# See the GNU Lesser General Public Licence version 2.1 for more # -# details (enclosed in the file LGPL). # -# # -# The special linking exception is detailled in the enclosed file # -# LICENSE. # -########################################################################## - -# Used programs -############### - -CAMLC = @OCAMLC@ -CAMLOPT = @OCAMLOPT@ -CAMLDEP = @OCAMLDEP@ -CAMLDOC = @OCAMLDOC@ -CAMLWEB = @OCAMLWEB@ -CAMLWC = @OCAMLWC@ -CAMLDOT = @OCAMLDOT@ -CAMLLIB = @OCAMLLIB@ -CAMLFIND= @OCAMLFIND@ -CAMLMAJORVERSION= @OCAMLMAJOR@ - -# Object/Library File Extensions -OBJ_EXT = @OBJEXT@ -LIB_EXT = @LIBEXT@ - -HAS_NATDYNLINK=@HAS_NATDYNLINK@ - -# Project -######### - -NAME = calendar -NAMELIB = calendarLib -VERSION = 2.04 - -LIBDIR = target - -LIBS = $(LIBDIR)/$(NAMELIB).cmo $(LIBDIR)/$(NAMELIB).cma -CLIBS = -ifneq ($(CAMLOPT),no) -LIBS := $(LIBS) $(LIBDIR)/$(NAMELIB).cmx $(LIBDIR)/$(NAMELIB).cmxa -ifeq ($(HAS_NATDYNLINK),yes) -LIBS := $(LIBS) $(LIBDIR)/$(NAMELIB).cmxs -endif -CLIBS := $(CLIBS) $(LIBDIR)/$(NAMELIB)$(OBJ_EXT) \ - $(LIBDIR)/$(NAMELIB)$(LIB_EXT) -endif - -DIRS = src target tests - -SRC = utils.mli utils.ml time_Zone.mli time_Zone.ml period.mli \ - time_sig.mli time.mli time.ml ftime.mli ftime.ml \ - date_sig.mli date.mli date.ml \ - calendar_sig.mli calendar_builder.mli calendar_builder.ml \ - calendar.mli calendar.ml fcalendar.mli fcalendar.ml \ - printer.mli printer.ml \ - version.mli version.ml -SRC := $(addprefix src/, $(SRC)) - -ML = $(filter %.ml, $(SRC)) -MLI = $(filter %.mli, $(SRC)) - -CMO = $(ML:.ml=.cmo) -CMX = $(CMO:.cmo=.cmx) -CMI = $(MLI:.mli=.cmi) -CMI_ONLY= src/period.cmi src/date_sig.cmi src/time_sig.cmi src/calendar_sig.cmi - -GENERATED= src/version.ml - -# Libs and flags -################ - -CAMLIBS = $(addprefix -I , $(DIRS)) - -CAMLFLAGS= $(CAMLIBS) -BYTEFLAGS= $(CAMLFLAGS) -LINK_OPTFLAGS = $(CAMLFLAGS) -noassert -OPTFLAGS = $(LINK_OPTFLAGS) -for-pack CalendarLib - -# Main rules -############ - -all: $(LIBS) META - -$(LIBDIR)/$(NAMELIB).cmo: $(CMI_ONLY) $(CMO) - mkdir -p $(LIBDIR) - $(CAMLFIND) ocamlc $(BYTEFLAGS) -pack -o $@ \ - $(filter-out $(LIBDIR), $^) - -$(LIBDIR)/$(NAMELIB).cma: $(LIBDIR)/$(NAMELIB).cmo - $(CAMLFIND) ocamlc $(BYTEFLAGS) -a -o $@ $< - -$(LIBDIR)/$(NAMELIB).cmx: $(CMI_ONLY) $(CMX) - mkdir -p $(LIBDIR) - $(CAMLFIND) ocamlopt $(LINK_OPTFLAGS) -pack -o $@ \ - $(filter-out $(LIBDIR), $^) - -$(LIBDIR)/$(NAMELIB).a $(LIBDIR)/$(NAMELIB).cmxa: $(LIBDIR)/$(NAMELIB).cmx - $(CAMLFIND) ocamlopt $(LINK_OPTFLAGS) -a -o $@ $< - -$(LIBDIR)/$(NAMELIB).cmxs: $(LIBDIR)/$(NAMELIB).cmxa - $(CAMLFIND) ocamlopt -I $(LIBDIR) -shared -linkall -o $@ $< - -src/version.ml: Makefile - echo "let version = \"$(VERSION)\"" > $@ - echo "let date = \"`date`\"" >> $@ - -META: Makefile - echo "name = \"$(NAME)\"" > $@ - echo "description = \"$(NAME) library\"" >> $@ - echo "version = \"$(VERSION)\"" >> $@ - echo "archive(byte) = \"$(NAMELIB).cma\"" >> $@ - echo "archive(native) = \"$(NAMELIB).cmxa\"" >> $@ - echo "requires = \"unix str\"" >> $@ - -# Generic rules -############### - -%.gz: % - gzip -f --best $< - -.SUFFIXES: .ml .mli .cmo .cmi .cmx $(OBJ_EXT) - -.mli.cmi: - $(CAMLC) $(BYTEFLAGS) -c $< - -.ml.cmo: - $(CAMLC) $(BYTEFLAGS) -c $< - -.ml$(OBJ_EXT): - $(CAMLOPT) $(OPTFLAGS) -c $< - -.ml.cmx: - $(CAMLOPT) $(OPTFLAGS) -c $< - -# Tests -####### - -TESTS_SRC= gen_test.mli gen_test.ml test_timezone.ml test_time.ml \ - test_ftime.ml test_date.ml test_calendar.ml test_fcalendar.ml \ - test_pcalendar.ml test_fpcalendar.ml test_printer.ml test.ml -TESTS_SRC:= $(addprefix tests/, $(TESTS_SRC)) - -TESTS_ML= $(filter %.ml, $(TESTS_SRC)) -TESTS_CMO= $(TESTS_ML:.ml=.cmo) - -$(TESTS_CMO) $(TESTS_CMI): $(LIBDIR)/$(NAMELIB).cmo $(LIBDIR)/$(NAMELIB).cmi - -tests/test: $(LIBDIR)/$(NAMELIB).cmo $(TESTS_CMO) - $(CAMLC) -o $@ $(BYTEFLAGS) unix.cma str.cma $(LIBDIR)/$(NAMELIB).cmo \ - $(TESTS_CMO) - -.PHONY: tests -tests: tests/test - ./$< - -# Documentation -############### - -wc: $(SRC) - $(CAMLWC) -p $^ - -$(NAMELIB).ps: $(SRC) - $(CAMLWEB) --ps -o $@ $^ - -ifeq ($(CAMLMAJORVERSION),3) -utils/example.ml: utils/example.ml.3 Makefile - cp $< $@ -else -utils/example.ml: utils/example.ml.4 Makefile - cp $< $@ -endif - -utils/example.cmo: utils/example.ml - $(CAMLC) -I +ocamldoc -I utils -c $< - -.PHONY: doc -doc: $(CMO) utils/example.cmo - mkdir -p doc - rm -f doc/* - $(CAMLDOC) -g utils/example.cmo -colorize-code -I src -d doc \ - $(MLI) $(ML) - -# Headers -######### - -.PHONY: headers -headers: - headache -c headache_config.txt -h HEADER $(SRC) $(TESTS_SRC) \ - Makefile.in utils/example.ml - headache -c headache_config.txt -h CONFIGURE_HEADER configure.in - -# Install -######### - -install: $(LIBS) $(CLIBS) META - @if [ "`sed -n -e 's/version = "\([0-9.+dev]*\)"/\1/p' META`" = "$(VERSION)" ]; then \ - (if test -d `ocamlfind install -help | grep destdir | sed -e "s/.*default: \(.*\))/\1/"`/$(NAME); then $(MAKE) uninstall; fi;\ - $(CAMLFIND) install $(NAME) target/*.cm* $(MLI) $(CLIBS) META); \ - else \ - (echo; echo "Not the good version. Please, do :"; \ - echo " make clean && make"; \ - echo "next reinstall"; echo) \ - fi - -uninstall: - $(CAMLFIND) remove $(NAME) - -# Exporting -########### - -EXPORT_DIR= $$HOME/EXPORT/$(NAME) -TMP_DIR = $$HOME/tmp - -ROOT= $$HOME/DEV/calendar - -export: doc - (cd $(TMP_DIR); \ - svn co svn+ssh://signoles@svn.forge.ocamlcore.org/svnroot/calendar/trunk) - svn copy $(TMP_DIR)/trunk $(ROOT)/tags/v$(VERSION) - rm -rf $(TMP_DIR)/trunk - (cd $(ROOT)/tags; svn commit -m "v $(VERSION)") - rm -rf $(EXPORT_DIR)/doc - mkdir -p $(EXPORT_DIR) - cp -rf CHANGES doc $(EXPORT_DIR) - cp -rf $(ROOT)/tags/v$(VERSION) $(TMP_DIR)/$(NAME)-$(VERSION) - cp -rf .depend configure config.status doc $(TMP_DIR)/$(NAME)-$(VERSION) - cd $(TMP_DIR); \ - (rm -rf $(NAME)-$(VERSION)/.svn $(NAME)-$(VERSION)/*/.svn; \ - tar cvf $(NAME)-$(VERSION).tar $(NAME)-$(VERSION); \ - gzip -f --best $(NAME)-$(VERSION).tar; \ - rm -rf $(NAME)-$(VERSION); \ - mv $(NAME)-$(VERSION).tar.gz $(EXPORT_DIR)) - rm -rf $(TMP_DIR)/$(NAME)-$(VERSION) - -# Rebuilding Makefile -##################### - -Makefile: Makefile.in - ./config.status - -config.status: configure - ./config.status --recheck - -configure: configure.in - autoconf - -# Emacs tags -############ - -TAGS: $(SRC) - otags -o $@ $^ - -# Cleaning -########## - -clean: - rm -f TAGS META $(TESTS) tests/test $(GENERATED) - for i in . src tests utils; do \ - rm -f $$i/*~ $$i/\#* $$i/*.cm[iox] $$i/*.*a $$i/*$(OBJ_EXT) $$i/a.out; \ - done - rm -f utils/example.ml - -dist-clean distclean: clean - rm -rf $(NAME).ps.gz doc $(LIBDIR) - -clean-configure cleanconfig: dist-clean - rm -f Makefile configure config.* - -# Depend -######## - -.depend depend: $(GENERATED) - rm -f .depend - $(CAMLDEP) -I src -I tests src/*.ml src/*.mli tests/*.ml tests/*.mli \ - > .depend - -view-depend: - $(CAMLDOT) .depend | dot -Tps | gv - - -include .depend diff --git a/README b/README deleted file mode 100644 index 0bb22b2..0000000 --- a/README +++ /dev/null @@ -1,113 +0,0 @@ -Summary -------- - -1- Introduction -2- Contents -3- Copyright -4- Installation -5- How to use -6- Documentation -7- Makefile -8- Contact the developper - -1- Introduction ---------------- - -The Calendar library is a library providing a set of operations over dates and -times. -This library requires Objective Caml (OCaml) 3.09.1 or higher. -OCaml 3.09 is usable at your own risks. -Older OCaml versions are unsupported. - -2- Contents ------------ - -CHANGES Information about the last changes -COPYING Information about copyright -LGPL Information about LGPL -README This file -Makefile.in Makefile used by configure -configure Script generating Makefile -configure.in Script generating configure (with autoconf) -calendar_faq.txt FAQ frow which some algorithms come -doc HTML documentation of the API -src Source files directory -target Directory containing the built library -tests Test files directory -utils Some utilities - -3- Copyright ------------- - -This program is distributed under the GNU LGPL 2.1. -See the enclosed file COPYING for more details. - -4- Installation ---------------- - -You need Objective Caml >= 3.09.1 to compile the sources. -You need too ocamlfind coming with findlib and available at: - http://www.ocaml-programming.de/packages/ - - 1. Configure with ./configure. - 2. Compile with make. - 3. Install with make install (you may need superuser permissions). - 4. Clean the directory with make clean. - -You can remove files installed by "make install" at any time with : - - make uninstall (you may need superuser permissions) - -5- How to use -------------- - -(a) Use the GODI package of calendar ! - - see: http://godi.ocaml-programming.de - -(b) Or: simply link calendar with your files using ocamlfind. - -For example, if you have a file foo_using_calendar.ml, compile it as follow: - - ocamlfind ocamlc -package calendar -linkpkg foo_using_calendar.ml -or - ocamlfind ocamlopt -package calendar -linkpkg foo_using_calendar.ml - -(c) Or: do not use ocamlfind, link calendar with unix and str and -specify the directory containing calendar: - - ocamlc -I /usr/local/lib/ocaml/site-lib/calendar unix.cma calendarLib.cmo foo_using_calendar.ml -or - ocamlopt -I /usr/local/lib/ocaml/site-lib/calendar unix.cmxa calendarLib.cmx foo_using_calendar.ml - -6- Documentation ----------------- - -The doc directory contains an html documentation of the .mli files. -This documentation is available online at - - http://calendar.forge.ocamlcore.org/doc/ - -7- Makefile ------------ - -A description of some Makefile entries follows : - -i. tests -Execute some tests - -ii. wc -Give informations about the size of the source files. You need ocamlwc (*). - -iii. doc -Produce the documentation of the API. You need ocamldoc (**). - -(*) ocamlwc is available at http://www.lri.fr/~filliatr/software.en.html -(**) ocamldoc is included with Objective Caml - -8- Contact the developper -------------------------- - -You can report bugs and/or give feedbacks by e-mail to : - - Julien.Signoles@NO_SPAM@gmail.com diff --git a/README.md b/README.md new file mode 100644 index 0000000..23e0a71 --- /dev/null +++ b/README.md @@ -0,0 +1,78 @@ +# Calendar + +A calendar library for OCaml. [API documentation](https://ocaml-community.github.io/calendar/calendar/CalendarLib/index.html) + +[![Travis build Status](https://travis-ci.org/ocaml-community/calendar.svg?branch=3.x)](https://travis-ci.org/ocaml-community/calendar) + +1. [Introduction](#1--introduction) +2. [Contents](#2--contents) +3. [Copyright](#3--copyright) +4. [Installation](#4--installation) +5. [How to use](#5--how-to-use) +6. [Documentation](#6--documentation) +7. [Makefile](#7--makefile) +8. [Contact the developers](#8--contact-the-developers) + +## 1- Introduction + +The Calendar library provides types and operations over dates and times. +This library requires OCaml 4.03.0 or higher. +Older OCaml versions are unsupported. + +## 2- Contents + +- `CHANGES` Information about the last changes +- `COPYING` Information about copyright +- `LGPL` Information about LGPL +- `README.md` This file +- `calendar_faq.txt` FAQ frow which some algorithms come +- `doc` HTML documentation of the API +- `src` Source files directory +- `_build/default/` Directory containing the built library +- `tests` Test files directory +- `utils` Some utilities + +## 3- Copyright + +This program is distributed under the GNU LGPL 2.1. +See the enclosed file COPYING for more details. + +## 4- Installation + +Easiest way is `opam install calendar`. + +To manually install the library, you first need to install `dune` and `re`. +Then: + +``` +$ dune build @install +$ dune install +``` + +You can remove files installed with : + +`dune uninstall` + +## 5- How to use + +Use the `calendar` library using ocamlfind. In dune, it means having +an entry `(libraries calendar)`. + +## 6- Documentation + +The doc directory contains an html documentation of the .mli files. +This documentation is available online at http://calendar.forge.ocamlcore.org/doc/ + +## 7- Makefile + +A description of some Makefile entries follows : + +- `make test` will execute some tests. You'll need [alcotest](https://github.com/mirage/alcotest). + + To run only some tests: `dune exec ./tests/test.exe test time` (for example) + +- `make doc` to produce the documentation of the API. You need [odoc](https://github.com/ocaml/odoc) + +## 8- Contact the developers + +You can report bugs at https://github.com/ocaml-community/calendar/issues diff --git a/calendar.opam b/calendar.opam new file mode 100644 index 0000000..8314e9b --- /dev/null +++ b/calendar.opam @@ -0,0 +1,26 @@ +opam-version: "2.0" +version: "3.0.0" +author: "Julien Signoles" +maintainer: "ocaml-community" +license: "LGPL-2.1 with OCaml linking exception" +synopsis: "Library for handling dates and times in your program" +build: [ + ["dune" "build" "-p" name "-j" jobs] + ["dune" "build" "@doc" "-p" name "-j" jobs] {with-doc} + ["dune" "runtest" "-p" name "-j" jobs] {with-test} +] +depends: [ + "ocaml" {>= "4.03"} + "re" {>= "1.7.2"} + "dune" {>= "1.0"} + "odoc" {with-doc} + "alcotest" {with-test} +] +tags: [ "calendar" "date" "time" "datetime" ] +homepage: "https://github.com/ocaml-community/calendar" +doc: "https://ocaml-community.github.io/calendar/" +bug-reports: "https://github.com/ocaml-community/calendar/issues" +dev-repo: "git+https://github.com/ocaml-community/calendar" +description:""" +Calendar is a library for handling dates and times in your program. +""" diff --git a/config.status b/config.status deleted file mode 100755 index 709641a..0000000 --- a/config.status +++ /dev/null @@ -1,906 +0,0 @@ -#! /bin/bash -# Generated by configure. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=${CONFIG_SHELL-/bin/bash} -export SHELL -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -# Files that config.status was made for. -config_files=" Makefile" - -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Report bugs to the package provider." - -ac_cs_config="" -ac_cs_version="\ -config.status -configured by ./configure, generated by GNU Autoconf 2.68, - with options \"$ac_cs_config\" - -Copyright (C) 2010 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='/localhome/julien/DEV/calendar/trunk' -srcdir='.' -test -n "$AWK" || AWK=awk -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -if $ac_cs_recheck; then - set X '/bin/bash' './configure' $ac_configure_extra_args --no-create --no-recursion - shift - $as_echo "running CONFIG_SHELL=/bin/bash $*" >&6 - CONFIG_SHELL='/bin/bash' - export CONFIG_SHELL - exec "$@" -fi - -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -cat >>"$ac_tmp/subs1.awk" <<\_ACAWK && -S["LTLIBOBJS"]="" -S["LIBOBJS"]="" -S["HAS_NATDYNLINK"]="yes" -S["LIBEXT"]=".a" -S["OBJEXT"]=".o" -S["OCAMLLIB"]="/localhome/julien/.opam/4.00.1/lib/ocaml" -S["OCAMLMAJOR"]="4" -S["OCAMLBEST"]="opt" -S["OCAMLDOT"]="ocamldot" -S["OCAMLWC"]="ocamlwc" -S["OCAMLWEB"]="ocamlweb" -S["OCAMLDOC"]="ocamldoc" -S["OCAMLFIND"]="ocamlfind" -S["OCAMLDEP"]="ocamldep" -S["OCAMLOPTDOTOPT"]="ocamlopt.opt" -S["OCAMLCDOTOPT"]="ocamlc.opt" -S["OCAMLOPT"]="ocamlopt.opt" -S["OCAMLC"]="ocamlc.opt" -S["target_alias"]="" -S["host_alias"]="" -S["build_alias"]="" -S["LIBS"]="" -S["ECHO_T"]="" -S["ECHO_N"]="-n" -S["ECHO_C"]="" -S["DEFS"]="-DPACKAGE_NAME=\\\"\\\" -DPACKAGE_TARNAME=\\\"\\\" -DPACKAGE_VERSION=\\\"\\\" -DPACKAGE_STRING=\\\"\\\" -DPACKAGE_BUGREPORT=\\\"\\\" -DPACKAGE_URL=\\\"\\\"" -S["mandir"]="${datarootdir}/man" -S["localedir"]="${datarootdir}/locale" -S["libdir"]="${exec_prefix}/lib" -S["psdir"]="${docdir}" -S["pdfdir"]="${docdir}" -S["dvidir"]="${docdir}" -S["htmldir"]="${docdir}" -S["infodir"]="${datarootdir}/info" -S["docdir"]="${datarootdir}/doc/${PACKAGE}" -S["oldincludedir"]="/usr/include" -S["includedir"]="${prefix}/include" -S["localstatedir"]="${prefix}/var" -S["sharedstatedir"]="${prefix}/com" -S["sysconfdir"]="${prefix}/etc" -S["datadir"]="${datarootdir}" -S["datarootdir"]="${prefix}/share" -S["libexecdir"]="${exec_prefix}/libexec" -S["sbindir"]="${exec_prefix}/sbin" -S["bindir"]="${exec_prefix}/bin" -S["program_transform_name"]="s,x,x," -S["prefix"]="/usr/local" -S["exec_prefix"]="${prefix}" -S["PACKAGE_URL"]="" -S["PACKAGE_BUGREPORT"]="" -S["PACKAGE_STRING"]="" -S["PACKAGE_VERSION"]="" -S["PACKAGE_TARNAME"]="" -S["PACKAGE_NAME"]="" -S["PATH_SEPARATOR"]=":" -S["SHELL"]="/bin/bash" -_ACAWK -cat >>"$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -fi # test -n "$CONFIG_FILES" - - -eval set X " :F $CONFIG_FILES " -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} - ac_datarootdir_hack=' - s&@datadir@&${datarootdir}&g - s&@docdir@&${datarootdir}/doc/${PACKAGE}&g - s&@infodir@&${datarootdir}/info&g - s&@localedir@&${datarootdir}/locale&g - s&@mandir@&${datarootdir}/man&g - s&\${datarootdir}&${prefix}/share&g' ;; -esac -ac_sed_extra="/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -} - -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - - - - esac - -done # for ac_tag - - -as_fn_exit 0 diff --git a/configure b/configure deleted file mode 100755 index dedfdac..0000000 --- a/configure +++ /dev/null @@ -1,3410 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68. -# -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= -PACKAGE_URL= - -ac_unique_file="src/date.ml" -ac_subst_vars='LTLIBOBJS -LIBOBJS -HAS_NATDYNLINK -LIBEXT -OBJEXT -OCAMLLIB -OCAMLMAJOR -OCAMLBEST -OCAMLDOT -OCAMLWC -OCAMLWEB -OCAMLDOC -OCAMLFIND -OCAMLDEP -OCAMLOPTDOTOPT -OCAMLCDOTOPT -OCAMLOPT -OCAMLC -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -' - ac_precious_vars='build_alias -host_alias -target_alias' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF -_ACEOF -fi - -if test -n "$ac_init_help"; then - - cat <<\_ACEOF - -Report bugs to the package provider. -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -configure -generated by GNU Autoconf 2.68 - -Copyright (C) 2010 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -# Check for Ocaml compilers - -# we first look for ocamlc in the path; if not present, we fail -# Extract the first word of "ocamlc", so it can be a program name with args. -set dummy ocamlc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OCAMLC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OCAMLC"; then - ac_cv_prog_OCAMLC="$OCAMLC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OCAMLC="ocamlc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_OCAMLC" && ac_cv_prog_OCAMLC="no" -fi -fi -OCAMLC=$ac_cv_prog_OCAMLC -if test -n "$OCAMLC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLC" >&5 -$as_echo "$OCAMLC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -if test "$OCAMLC" = no ; then - as_fn_error $? "Cannot find ocamlc." "$LINENO" 5 -fi - -# we extract Ocaml version number and library path: ocaml 3.09.1 is required -OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version *\(.*\)$|\1|p' ` -echo $ECHO_N "ocaml version is $OCAMLVERSION: $ECHO_C" -case $OCAMLVERSION in - 3.09.**) OCAMLMAJOR=3; echo "${ECHO_T}Good!";; - 3.09*) OCAMLMAJOR=3; echo "${ECHO_T}Warning: unsupported version. Compile at your own risks";; - 3.0*) echo "${ECHO_T}Unsupported version!"; exit 2;; - 3.*) OCAMLMAJOR=3; echo "${ECHO_T}Good!";; - 4.*) OCAMLMAJOR=4; echo "${ECHO_T}Good!";; - *) echo "${ECHO_T}Unsupported version!"; exit 2;; -esac - -OCAMLLIB=`$OCAMLC -where | tr -d '\r'` -echo "ocaml library path is $OCAMLLIB" - -# then we look for ocamlopt; if not present, we issue a warning -# if the version is not the same, we also discard it -# we set OCAMLBEST to "opt" or "byte", whether ocamlopt is available or not -# Extract the first word of "ocamlopt", so it can be a program name with args. -set dummy ocamlopt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OCAMLOPT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OCAMLOPT"; then - ac_cv_prog_OCAMLOPT="$OCAMLOPT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OCAMLOPT="ocamlopt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_OCAMLOPT" && ac_cv_prog_OCAMLOPT="no" -fi -fi -OCAMLOPT=$ac_cv_prog_OCAMLOPT -if test -n "$OCAMLOPT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLOPT" >&5 -$as_echo "$OCAMLOPT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -OCAMLBEST=byte -if test "$OCAMLOPT" = no ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find ocamlopt; bytecode compilation only." >&5 -$as_echo "$as_me: WARNING: Cannot find ocamlopt; bytecode compilation only." >&2;} -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking ocamlopt version" >&5 -$as_echo_n "checking ocamlopt version... " >&6; } - TMPVERSION=`$OCAMLOPT -v | sed -n -e 's|.*version *\(.*\)$|\1|p' ` - if test "$TMPVERSION" != "$OCAMLVERSION" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: differs from ocamlc; ocamlopt discarded." >&5 -$as_echo "differs from ocamlc; ocamlopt discarded." >&6; } - OCAMLOPT=no - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - OCAMLBEST=opt - fi -fi - -# checking for ocamlc.opt -# Extract the first word of "ocamlc.opt", so it can be a program name with args. -set dummy ocamlc.opt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OCAMLCDOTOPT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OCAMLCDOTOPT"; then - ac_cv_prog_OCAMLCDOTOPT="$OCAMLCDOTOPT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OCAMLCDOTOPT="ocamlc.opt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_OCAMLCDOTOPT" && ac_cv_prog_OCAMLCDOTOPT="no" -fi -fi -OCAMLCDOTOPT=$ac_cv_prog_OCAMLCDOTOPT -if test -n "$OCAMLCDOTOPT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLCDOTOPT" >&5 -$as_echo "$OCAMLCDOTOPT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -if test "$OCAMLCDOTOPT" != no ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking ocamlc.opt version" >&5 -$as_echo_n "checking ocamlc.opt version... " >&6; } - TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version *\(.*\)$|\1|p' ` - if test "$TMPVERSION" != "$OCAMLVERSION" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: differs from ocamlc; ocamlc.opt discarded." >&5 -$as_echo "differs from ocamlc; ocamlc.opt discarded." >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - OCAMLC=$OCAMLCDOTOPT - fi -fi - -# checking for ocamlopt.opt -if test "$OCAMLOPT" != no ; then - # Extract the first word of "ocamlopt.opt", so it can be a program name with args. -set dummy ocamlopt.opt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OCAMLOPTDOTOPT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OCAMLOPTDOTOPT"; then - ac_cv_prog_OCAMLOPTDOTOPT="$OCAMLOPTDOTOPT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OCAMLOPTDOTOPT="ocamlopt.opt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_OCAMLOPTDOTOPT" && ac_cv_prog_OCAMLOPTDOTOPT="no" -fi -fi -OCAMLOPTDOTOPT=$ac_cv_prog_OCAMLOPTDOTOPT -if test -n "$OCAMLOPTDOTOPT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLOPTDOTOPT" >&5 -$as_echo "$OCAMLOPTDOTOPT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "$OCAMLOPTDOTOPT" != no ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking ocamlc.opt version" >&5 -$as_echo_n "checking ocamlc.opt version... " >&6; } - TMPVER=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version *\(.*\)$|\1|p' ` - if test "$TMPVER" != "$OCAMLVERSION" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: differs from ocamlc; ocamlopt.opt discarded." >&5 -$as_echo "differs from ocamlc; ocamlopt.opt discarded." >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - OCAMLOPT=$OCAMLOPTDOTOPT - fi - fi -fi - -# ocamldep and ocamlfind should also be present in the path -# Extract the first word of "ocamldep", so it can be a program name with args. -set dummy ocamldep; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OCAMLDEP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OCAMLDEP"; then - ac_cv_prog_OCAMLDEP="$OCAMLDEP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OCAMLDEP="ocamldep" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_OCAMLDEP" && ac_cv_prog_OCAMLDEP="no" -fi -fi -OCAMLDEP=$ac_cv_prog_OCAMLDEP -if test -n "$OCAMLDEP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLDEP" >&5 -$as_echo "$OCAMLDEP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -if test "$OCAMLDEP" = no ; then - as_fn_error $? "Cannot find ocamldep." "$LINENO" 5 -fi - -# Extract the first word of "ocamlfind", so it can be a program name with args. -set dummy ocamlfind; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OCAMLFIND+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OCAMLFIND"; then - ac_cv_prog_OCAMLFIND="$OCAMLFIND" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OCAMLFIND="ocamlfind" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_OCAMLFIND" && ac_cv_prog_OCAMLFIND="no" -fi -fi -OCAMLFIND=$ac_cv_prog_OCAMLFIND -if test -n "$OCAMLFIND"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLFIND" >&5 -$as_echo "$OCAMLFIND" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -if test "$OCAMLFIND" = no ; then - as_fn_error $? "Cannot find ocamlfind." "$LINENO" 5 -fi - -# Not mandatory tools - -# Extract the first word of "ocamldoc", so it can be a program name with args. -set dummy ocamldoc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OCAMLDOC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OCAMLDOC"; then - ac_cv_prog_OCAMLDOC="$OCAMLDOC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OCAMLDOC="ocamldoc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_OCAMLDOC" && ac_cv_prog_OCAMLDOC="true" -fi -fi -OCAMLDOC=$ac_cv_prog_OCAMLDOC -if test -n "$OCAMLDOC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLDOC" >&5 -$as_echo "$OCAMLDOC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -if test "$OCAMLDOC" = true ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find ocamldoc" >&5 -$as_echo "$as_me: WARNING: Cannot find ocamldoc" >&2;} -# JS: documentation generator does not work with ocamldoc.opt :( -#else -# AC_CHECK_PROG(OCAMLDOCOPT,ocamldoc.opt,ocamldoc.opt,no) -# if test "$OCAMLDOCOPT" != no ; then -# OCAMLDOC=$OCAMLDOCOPT -# fi -fi - -# Extract the first word of "ocamlweb", so it can be a program name with args. -set dummy ocamlweb; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OCAMLWEB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OCAMLWEB"; then - ac_cv_prog_OCAMLWEB="$OCAMLWEB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OCAMLWEB="ocamlweb" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_OCAMLWEB" && ac_cv_prog_OCAMLWEB="ocamlweb" -fi -fi -OCAMLWEB=$ac_cv_prog_OCAMLWEB -if test -n "$OCAMLWEB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLWEB" >&5 -$as_echo "$OCAMLWEB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# Extract the first word of "ocamlwc", so it can be a program name with args. -set dummy ocamlwc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OCAMLWC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OCAMLWC"; then - ac_cv_prog_OCAMLWC="$OCAMLWC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OCAMLWC="ocamlwc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_OCAMLWC" && ac_cv_prog_OCAMLWC="ocamlwc" -fi -fi -OCAMLWC=$ac_cv_prog_OCAMLWC -if test -n "$OCAMLWC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLWC" >&5 -$as_echo "$OCAMLWC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -# Extract the first word of "ocamldot", so it can be a program name with args. -set dummy ocamldot; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OCAMLDOT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OCAMLDOT"; then - ac_cv_prog_OCAMLDOT="$OCAMLDOT" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_OCAMLDOT="ocamldot" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_OCAMLDOT" && ac_cv_prog_OCAMLDOT="ocamldot" -fi -fi -OCAMLDOT=$ac_cv_prog_OCAMLDOT -if test -n "$OCAMLDOT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLDOT" >&5 -$as_echo "$OCAMLDOT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -# platform -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking platform" >&5 -$as_echo_n "checking platform... " >&6; } -#if echo "let _ = Sys.os_type" | ocaml | grep -q Win32; then -if test -z "$system" ; then - system=`ocamlc -config 2>/dev/null|grep system|sed 's/system: //'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${system}" >&5 -$as_echo "${system}" >&6; } - # This may be - # - mingw - # - win32 - # - win64 - # - cygwin - # - some other string means Unix - # - empty means ocamlc does not support -config -fi - -use_cygpath=0 -case "$system" in - mingw) use_cygpath=1;; - win32) use_cygpath=1;; - win64) use_cygpath=1;; -esac - -if test ${use_cygpath} -gt 0 ; then - OCAMLDEP="${OCAMLDEP} -slash" -fi - -# extension for object and library files -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking extension for object files" >&5 -$as_echo_n "checking extension for object files... " >&6; } -OBJEXT=`ocamlc -config 2>/dev/null|grep ext_obj|sed 's/ext_obj: //'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${OBJEXT}" >&5 -$as_echo "${OBJEXT}" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking extension for library files" >&5 -$as_echo_n "checking extension for library files... " >&6; } -LIBEXT=`ocamlc -config 2>/dev/null|grep ext_lib|sed 's/ext_lib: //'` -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBEXT}" >&5 -$as_echo "${LIBEXT}" >&6; } - -# Checking workable native dynlink -HAS_NATDYNLINK=no -as_ac_File=`$as_echo "ac_cv_file_${OCAMLLIB}/dynlink.cmxa" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${OCAMLLIB}/dynlink.cmxa" >&5 -$as_echo_n "checking for ${OCAMLLIB}/dynlink.cmxa... " >&6; } -if eval \${$as_ac_File+:} false; then : - $as_echo_n "(cached) " >&6 -else - test "$cross_compiling" = yes && - as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 -if test -r "${OCAMLLIB}/dynlink.cmxa"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -eval ac_res=\$$as_ac_File - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : - HAS_NATDYNLINK=yes -else - HAS_NATDYNLINK=no -fi - - -if test "$HAS_NATDYNLINK" != "no" ; then - echo "let f x y = Dynlink.loadfile \"foo\"; ignore (Dynlink.is_native); abs_float (x -. y)" > test_dynlink.ml - if ($OCAMLOPT -shared -linkall -o test_dynlink.cmxs test_dynlink.ml) \ - 2> /dev/null ; \ - then - HAS_NATDYNLINK=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: native dynlink works fine. Great." >&5 -$as_echo "native dynlink works fine. Great." >&6; } - else - HAS_NATDYNLINK=no - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: native dynlink does not work on your platform. Disabled." >&5 -$as_echo "$as_me: WARNING: native dynlink does not work on your platform. Disabled." >&2;} - fi - rm -f test_dynlink.* -fi - -# substitutions to perform - - - - - - - - - - - - - - - -# Finally create the Makefile from Makefile.in -ac_config_files="$ac_config_files Makefile" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -ac_script=' -:mline -/\\$/{ - N - s,\\\n,, - b mline -} -t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g -t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g -t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` - - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Report bugs to the package provider." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.68, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2010 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - - -eval set X " :F $CONFIG_FILES " -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - - - - esac - -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - -chmod a-w Makefile diff --git a/configure.in b/configure.in deleted file mode 100644 index 89f1df3..0000000 --- a/configure.in +++ /dev/null @@ -1,211 +0,0 @@ -########################################################################## -# # -# autoconf input for Objective Caml programs # -# Copyright (C) 2001 Jean-Christophe Filliâtre # -# from a first script by Georges Mariano # -# # -# Script modified by Julien Signoles for the Calendar library. # -# # -# This library is free software; you can redistribute it and/or # -# modify it under the terms of the GNU Library General Public # -# License version 2, as published by the Free Software Foundation. # -# # -# This library is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# # -# See the GNU Library General Public License version 2 for more # -# details (see ). # -# # -########################################################################## - -# the script generated by autoconf from this input will set the following -# variables: -# OCAMLC "ocamlc" if present in the path, or a failure -# or "ocamlc.opt" if present with same version number as ocamlc -# OCAMLOPT "ocamlopt" (or "ocamlopt.opt" if present), or "no" -# OCAMLBEST either "byte" if no native compiler was found, -# or "opt" otherwise -# OCAMLDEP "ocamldep" -# OCAMLLIB the path to the ocaml standard library -# OCAMLFIND "ocamlfind" -# OCAMLVERSION the ocaml version number -# OCAMLDOC "ocamldoc" or "ocamldoc.opt" (not mandatory) -# OCAMLWEB "ocamlweb" (not mandatory) -# OCAMLWC "ocamlwc" (not mandatory) -# OCAMLDOT "ocamldot" (not mandatory) - -# check for one particular file of the sources -# ADAPT THE FOLLOWING LINE TO YOUR SOURCES! -AC_INIT(src/date.ml) - -# Check for Ocaml compilers - -# we first look for ocamlc in the path; if not present, we fail -AC_CHECK_PROG(OCAMLC,ocamlc,ocamlc,no) -if test "$OCAMLC" = no ; then - AC_MSG_ERROR(Cannot find ocamlc.) -fi - -# we extract Ocaml version number and library path: ocaml 3.09.1 is required -OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version *\(.*\)$|\1|p' ` -echo $ECHO_N "ocaml version is $OCAMLVERSION: $ECHO_C" -case $OCAMLVERSION in - 3.09.**) OCAMLMAJOR=3; echo "${ECHO_T}Good!";; - 3.09*) OCAMLMAJOR=3; echo "${ECHO_T}Warning: unsupported version. Compile at your own risks";; - 3.0*) echo "${ECHO_T}Unsupported version!"; exit 2;; - 3.*) OCAMLMAJOR=3; echo "${ECHO_T}Good!";; - 4.*) OCAMLMAJOR=4; echo "${ECHO_T}Good!";; - *) echo "${ECHO_T}Unsupported version!"; exit 2;; -esac - -OCAMLLIB=`$OCAMLC -where | tr -d '\r'` -echo "ocaml library path is $OCAMLLIB" - -# then we look for ocamlopt; if not present, we issue a warning -# if the version is not the same, we also discard it -# we set OCAMLBEST to "opt" or "byte", whether ocamlopt is available or not -AC_CHECK_PROG(OCAMLOPT,ocamlopt,ocamlopt,no) -OCAMLBEST=byte -if test "$OCAMLOPT" = no ; then - AC_MSG_WARN(Cannot find ocamlopt; bytecode compilation only.) -else - AC_MSG_CHECKING(ocamlopt version) - TMPVERSION=`$OCAMLOPT -v | sed -n -e 's|.*version *\(.*\)$|\1|p' ` - if test "$TMPVERSION" != "$OCAMLVERSION" ; then - AC_MSG_RESULT(differs from ocamlc; ocamlopt discarded.) - OCAMLOPT=no - else - AC_MSG_RESULT(ok) - OCAMLBEST=opt - fi -fi - -# checking for ocamlc.opt -AC_CHECK_PROG(OCAMLCDOTOPT,ocamlc.opt,ocamlc.opt,no) -if test "$OCAMLCDOTOPT" != no ; then - AC_MSG_CHECKING(ocamlc.opt version) - TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version *\(.*\)$|\1|p' ` - if test "$TMPVERSION" != "$OCAMLVERSION" ; then - AC_MSG_RESULT(differs from ocamlc; ocamlc.opt discarded.) - else - AC_MSG_RESULT(ok) - OCAMLC=$OCAMLCDOTOPT - fi -fi - -# checking for ocamlopt.opt -if test "$OCAMLOPT" != no ; then - AC_CHECK_PROG(OCAMLOPTDOTOPT,ocamlopt.opt,ocamlopt.opt,no) - if test "$OCAMLOPTDOTOPT" != no ; then - AC_MSG_CHECKING(ocamlc.opt version) - TMPVER=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version *\(.*\)$|\1|p' ` - if test "$TMPVER" != "$OCAMLVERSION" ; then - AC_MSG_RESULT(differs from ocamlc; ocamlopt.opt discarded.) - else - AC_MSG_RESULT(ok) - OCAMLOPT=$OCAMLOPTDOTOPT - fi - fi -fi - -# ocamldep and ocamlfind should also be present in the path -AC_CHECK_PROG(OCAMLDEP,ocamldep,ocamldep,no) -if test "$OCAMLDEP" = no ; then - AC_MSG_ERROR(Cannot find ocamldep.) -fi - -AC_CHECK_PROG(OCAMLFIND,ocamlfind,ocamlfind,no) -if test "$OCAMLFIND" = no ; then - AC_MSG_ERROR(Cannot find ocamlfind.) -fi - -# Not mandatory tools - -AC_CHECK_PROG(OCAMLDOC,ocamldoc,ocamldoc,true) -if test "$OCAMLDOC" = true ; then - AC_MSG_WARN(Cannot find ocamldoc) -# JS: documentation generator does not work with ocamldoc.opt :( -#else -# AC_CHECK_PROG(OCAMLDOCOPT,ocamldoc.opt,ocamldoc.opt,no) -# if test "$OCAMLDOCOPT" != no ; then -# OCAMLDOC=$OCAMLDOCOPT -# fi -fi - -AC_CHECK_PROG(OCAMLWEB,ocamlweb,ocamlweb,ocamlweb) -AC_CHECK_PROG(OCAMLWC,ocamlwc,ocamlwc,ocamlwc) -AC_CHECK_PROG(OCAMLDOT,ocamldot,ocamldot,ocamldot) - -# platform -AC_MSG_CHECKING(platform) -#if echo "let _ = Sys.os_type" | ocaml | grep -q Win32; then -if test -z "$system" ; then - system=`ocamlc -config 2>/dev/null|grep system|sed 's/system: //'` - AC_MSG_RESULT(${system}) - # This may be - # - mingw - # - win32 - # - win64 - # - cygwin - # - some other string means Unix - # - empty means ocamlc does not support -config -fi - -use_cygpath=0 -case "$system" in - mingw) use_cygpath=1;; - win32) use_cygpath=1;; - win64) use_cygpath=1;; -esac - -if test ${use_cygpath} -gt 0 ; then - OCAMLDEP="${OCAMLDEP} -slash" -fi - -# extension for object and library files -AC_MSG_CHECKING(extension for object files) -OBJEXT=`ocamlc -config 2>/dev/null|grep ext_obj|sed 's/ext_obj: //'` -AC_MSG_RESULT(${OBJEXT}) - -AC_MSG_CHECKING(extension for library files) -LIBEXT=`ocamlc -config 2>/dev/null|grep ext_lib|sed 's/ext_lib: //'` -AC_MSG_RESULT(${LIBEXT}) - -# Checking workable native dynlink -HAS_NATDYNLINK=no -AC_CHECK_FILE(${OCAMLLIB}/dynlink.cmxa,HAS_NATDYNLINK=yes,HAS_NATDYNLINK=no) - -if test "$HAS_NATDYNLINK" != "no" ; then - echo "let f x y = Dynlink.loadfile \"foo\"; ignore (Dynlink.is_native); abs_float (x -. y)" > test_dynlink.ml - if ($OCAMLOPT -shared -linkall -o test_dynlink.cmxs test_dynlink.ml) \ - 2> /dev/null ; \ - then - HAS_NATDYNLINK=yes - AC_MSG_RESULT([native dynlink works fine. Great.]) - else - HAS_NATDYNLINK=no - AC_MSG_WARN([native dynlink does not work on your platform. Disabled.]) - fi - rm -f test_dynlink.* -fi - -# substitutions to perform -AC_SUBST(OCAMLC) -AC_SUBST(OCAMLOPT) -AC_SUBST(OCAMLDEP) -AC_SUBST(OCAMLFIND) -AC_SUBST(OCAMLBEST) -AC_SUBST(OCAMLMAJOR) -AC_SUBST(OCAMLLIB) -AC_SUBST(OCAMLDOC) -AC_SUBST(OCAMLWEB) -AC_SUBST(OCAMLWC) -AC_SUBST(OCAMLDOT) -AC_SUBST(OBJEXT) -AC_SUBST(LIBEXT) -AC_SUBST(HAS_NATDYNLINK) - -# Finally create the Makefile from Makefile.in -AC_OUTPUT(Makefile) -chmod a-w Makefile diff --git a/doc/Calendar.Precise.html b/doc/Calendar.Precise.html deleted file mode 100644 index ec57f49..0000000 --- a/doc/Calendar.Precise.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Calendar.Precise - - - -

Module Calendar.Precise

-
module Precise: Calendar_sig.S  with module Date = Date and module Time = Time
-More precise implementation of calendar in which seconds are integer.
-Since 2.0
-
-
-
-

Datatypes


-
module Date: Date_sig.S 
-Date implementation used by this calendar. -
-
module Time: Time_sig.S 
-Time implementation used by this calendar. -
-
type t 
- -
type day = Date.day = 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-| -Sun
-| -Mon
-| -Tue
-| -Wed
-| -Thu
-| -Fri
-| -Sat(*Days of the week.*)
- - -
type month = Date.month = 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-| -Jan
-| -Feb
-| -Mar
-| -Apr
-| -May
-| -Jun
-| -Jul
-| -Aug
-| -Sep
-| -Oct
-| -Nov
-| -Dec(*Months of the year.*)
- - -
type year = Date.year 
-
-Year as an int
-
- -
type second = Time.second 
- -
type field = [ `Day | `Hour | `Minute | `Month | `Second | `Week | `Year ] 
-
-The different fields of a calendar.
-
- -
-

Constructors


-
val make : int -> int -> int -> int -> int -> second -> t
-make year month day hour minute second makes the calendar - "year-month-day; hour-minute-second".
-Raises
  • D.Out_of_bounds when a date is outside the Julian period.
  • -
  • D.Undefined when a date belongs to [October 5th, 1582; October - 14th, 1582].
  • -
-
-
val lmake : year:int ->
?month:int ->
?day:int ->
?hour:int ->
?minute:int -> ?second:second -> unit -> t
-Labelled version of make. - The default value of month and day (resp. of hour, minute - and second) is 1 (resp. 0).
-Since 1.05
-Raises
  • D.Out_of_bounds when a date is outside the Julian period.
  • -
  • D.Undefined when a date belongs to [October 5th, 1582; October - 14th, 1582].
  • -
-
-
val create : Date.t -> Time.t -> t
-create d t creates a calendar from the given date and time.
-
-
val now : unit -> t
-now () returns the current date and time (in the current time - zone).
-
-
val from_jd : float -> t
-Return the Julian day. - More precise than Date.from_jd: the fractional part represents the - time.
-
-
val from_mjd : float -> t
-Return the Modified Julian day. - It is Julian day - 2 400 000.5 (more precise than Date.from_mjd).
-
-
-

Conversions


-
-Those functions have the same behaviour as those defined in - Time_sig.S.
-
val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-See also Time_sig.S.convert
-
-
val to_gmt : t -> t
-See also Time_sig.S.to_gmt
-
-
val from_gmt : t -> t
-See also Time_sig.S.from_gmt
-
-
-

Getters


-
-Those functions have the same behavious as those defined in - Date_sig.S.
-
val days_in_month : t -> int
-
val day_of_week : t -> day
-
val day_of_month : t -> int
-
val day_of_year : t -> int
-
val week : t -> int
-See also Date_sig.S.week
-
-
val month : t -> month
-See also Date_sig.S.month
-
-
val year : t -> int
-See also Date_sig.S.year
-
-
-to_jd and to_mjd are more precise than Date_sig.S.to_jd and - Date_sig.S.to_mjd.
-
val to_jd : t -> float
val to_mjd : t -> float

-Those functions have the same behavious as those defined in - Time_sig.S.
-
val hour : t -> int
-See also Time_sig.S.hour
-
-
val minute : t -> int
-See also Time_sig.S.minute
-
-
val second : t -> second
-See also Time_sig.S.second
-
-
-

Calendars are comparable


-
val equal : t -> t -> bool
-Equality function between two calendars.
-See also Utils.Comparable.equal.
-
-
val compare : t -> t -> int
-Comparison function between two calendars.
-See also Utils.Comparable.compare.
-
-
val hash : t -> int
-Hash function for calendars.
-Since 2.0
-See also Utils.Comparable.hash.
-
-
-Those functions have the same behavious as those defined in - Date_sig.S.
-
val is_leap_day : t -> bool
-
val is_gregorian : t -> bool
-
val is_julian : t -> bool
-
-Those functions have the same behavious as those defined in - Time_sig.S.
-
val is_pm : t -> bool
-See also Time_sig.S.is_pm
-
-
val is_am : t -> bool
-See also Time_sig.S.is_am
-
-
-

Coercions


-
val to_unixtm : t -> Unix.tm
-Convert a calendar into the unix.tm type. - The field isdst is always false. More precise than - Date_sig.S.to_unixtm.
-Since 1.01
-
-
val from_unixtm : Unix.tm -> t
-Inverse of to_unixtm. Assumes the current time zone. - So, The following invariant holds: - hour (from_unixtm u) = u.Unix.tm_hour.
-Since 1.01
-
-
val to_unixfloat : t -> float
-Convert a calendar to a float such than - to_unixfloat (make 1970 1 1 0 0 0) returns 0.0 at UTC. - So such a float is convertible with those of the module Unix. - More precise than Date_sig.S.to_unixfloat.
-Since 1.01
-
-
val from_unixfloat : float -> t
-Inverse of to_unixfloat. Assumes the current time zone. - So, the following invariant holds: - hour (from_unixfloat u) = (Unix.gmtime u).Unix.tm_hour.
-Since 1.01
-
-
val from_date : Date.t -> t
-Convert a date to a calendar. - The time is midnight in the current time zone.
-
-
val to_date : t -> Date.t
-Convert a calendar to a date. Time part of the calendar is ignored.
-
-
val to_time : t -> Time.t
-Convert a calendar to a time. Date part of the calendar is ignored.
-Since 1.03
-
-
-

Period


-
module Period: sig .. end
-A period is the number of seconds between two calendars. -
-
-

Arithmetic operations on calendars and periods


-
-Those functions have the same behavious as those defined in - Date_sig.S.
-
val add : t ->
[< Period.date_field ] Period.period -> t
-See also Date_sig.S.add
-
-
val sub : t ->
t ->
[< Period.date_field > `Day `Week ] Period.period
-See also Date_sig.S.sub
-
-
val precise_sub : t -> t -> Period.t
-Since 2.03
-See also Date_sig.S.precise_sub
-
-
val rem : t ->
[< Period.date_field ] Period.period -> t
-See also Date_sig.S.rem
-
-
val next : t -> field -> t
-See also Date_sig.S.next
-
-
val prev : t -> field -> t
-See also Date_sig.S.prev
-
- \ No newline at end of file diff --git a/doc/Calendar.html b/doc/Calendar.html deleted file mode 100644 index 0eb466b..0000000 --- a/doc/Calendar.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -Calendar - - - -

Module Calendar

-
module Calendar: sig .. end
-Calendar implementation in which seconds are integer. -

- - This module uses float. Then results may be unprecise, especially - comparison of calendars which differ with few seconds. - In this case, consider to use module Precise.
-

-
-
include Calendar_sig.S
-
module Precise: Calendar_sig.S  with module Date = Date and module Time = Time
-More precise implementation of calendar in which seconds are integer. -
- \ No newline at end of file diff --git a/doc/Calendar_builder.Make.html b/doc/Calendar_builder.Make.html deleted file mode 100644 index 54debfc..0000000 --- a/doc/Calendar_builder.Make.html +++ /dev/null @@ -1,424 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Calendar_builder.Make - - - -

Functor Calendar_builder.Make

-
module Make: 
functor (D : Date_sig.S) ->
functor (T : Time_sig.S) -> Calendar_sig.S with module Date = D and module Time = T
-Implement a calendar from a date implementation and a time implementation. -

- - This module uses float. Then results may be very unprecise.
-Since 2.0
-

- - - - - -
Parameters: - - - - - - - -
-D:Date_sig.S -
-T:Time_sig.S -
-
-
-
-

Datatypes


-
module Date: Date_sig.S 
-Date implementation used by this calendar. -
-
module Time: Time_sig.S 
-Time implementation used by this calendar. -
-
type t 
- -
type day = Date.day = 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-| -Sun
-| -Mon
-| -Tue
-| -Wed
-| -Thu
-| -Fri
-| -Sat(*Days of the week.*)
- - -
type month = Date.month = 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-| -Jan
-| -Feb
-| -Mar
-| -Apr
-| -May
-| -Jun
-| -Jul
-| -Aug
-| -Sep
-| -Oct
-| -Nov
-| -Dec(*Months of the year.*)
- - -
type year = Date.year 
-
-Year as an int
-
- -
type second = Time.second 
- -
type field = [ `Day | `Hour | `Minute | `Month | `Second | `Week | `Year ] 
-
-The different fields of a calendar.
-
- -
-

Constructors


-
val make : int -> int -> int -> int -> int -> second -> t
-make year month day hour minute second makes the calendar - "year-month-day; hour-minute-second".
-Raises
  • D.Out_of_bounds when a date is outside the Julian period.
  • -
  • D.Undefined when a date belongs to [October 5th, 1582; October - 14th, 1582].
  • -
-
-
val lmake : year:int ->
?month:int ->
?day:int ->
?hour:int ->
?minute:int -> ?second:second -> unit -> t
-Labelled version of make. - The default value of month and day (resp. of hour, minute - and second) is 1 (resp. 0).
-Since 1.05
-Raises
  • D.Out_of_bounds when a date is outside the Julian period.
  • -
  • D.Undefined when a date belongs to [October 5th, 1582; October - 14th, 1582].
  • -
-
-
val create : Date.t -> Time.t -> t
-create d t creates a calendar from the given date and time.
-
-
val now : unit -> t
-now () returns the current date and time (in the current time - zone).
-
-
val from_jd : float -> t
-Return the Julian day. - More precise than Date.from_jd: the fractional part represents the - time.
-
-
val from_mjd : float -> t
-Return the Modified Julian day. - It is Julian day - 2 400 000.5 (more precise than Date.from_mjd).
-
-
-

Conversions


-
-Those functions have the same behaviour as those defined in - Time_sig.S.
-
val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-See also Time_sig.S.convert
-
-
val to_gmt : t -> t
-See also Time_sig.S.to_gmt
-
-
val from_gmt : t -> t
-See also Time_sig.S.from_gmt
-
-
-

Getters


-
-Those functions have the same behavious as those defined in - Date_sig.S.
-
val days_in_month : t -> int
-
val day_of_week : t -> day
-
val day_of_month : t -> int
-
val day_of_year : t -> int
-
val week : t -> int
-See also Date_sig.S.week
-
-
val month : t -> month
-See also Date_sig.S.month
-
-
val year : t -> int
-See also Date_sig.S.year
-
-
-to_jd and to_mjd are more precise than Date_sig.S.to_jd and - Date_sig.S.to_mjd.
-
val to_jd : t -> float
val to_mjd : t -> float

-Those functions have the same behavious as those defined in - Time_sig.S.
-
val hour : t -> int
-See also Time_sig.S.hour
-
-
val minute : t -> int
-See also Time_sig.S.minute
-
-
val second : t -> second
-See also Time_sig.S.second
-
-
-

Calendars are comparable


-
val equal : t -> t -> bool
-Equality function between two calendars.
-See also Utils.Comparable.equal.
-
-
val compare : t -> t -> int
-Comparison function between two calendars.
-See also Utils.Comparable.compare.
-
-
val hash : t -> int
-Hash function for calendars.
-Since 2.0
-See also Utils.Comparable.hash.
-
-
-Those functions have the same behavious as those defined in - Date_sig.S.
-
val is_leap_day : t -> bool
-
val is_gregorian : t -> bool
-
val is_julian : t -> bool
-
-Those functions have the same behavious as those defined in - Time_sig.S.
-
val is_pm : t -> bool
-See also Time_sig.S.is_pm
-
-
val is_am : t -> bool
-See also Time_sig.S.is_am
-
-
-

Coercions


-
val to_unixtm : t -> Unix.tm
-Convert a calendar into the unix.tm type. - The field isdst is always false. More precise than - Date_sig.S.to_unixtm.
-Since 1.01
-
-
val from_unixtm : Unix.tm -> t
-Inverse of to_unixtm. Assumes the current time zone. - So, The following invariant holds: - hour (from_unixtm u) = u.Unix.tm_hour.
-Since 1.01
-
-
val to_unixfloat : t -> float
-Convert a calendar to a float such than - to_unixfloat (make 1970 1 1 0 0 0) returns 0.0 at UTC. - So such a float is convertible with those of the module Unix. - More precise than Date_sig.S.to_unixfloat.
-Since 1.01
-
-
val from_unixfloat : float -> t
-Inverse of to_unixfloat. Assumes the current time zone. - So, the following invariant holds: - hour (from_unixfloat u) = (Unix.gmtime u).Unix.tm_hour.
-Since 1.01
-
-
val from_date : Date.t -> t
-Convert a date to a calendar. - The time is midnight in the current time zone.
-
-
val to_date : t -> Date.t
-Convert a calendar to a date. Time part of the calendar is ignored.
-
-
val to_time : t -> Time.t
-Convert a calendar to a time. Date part of the calendar is ignored.
-Since 1.03
-
-
-

Period


-
module Period: sig .. end
-A period is the number of seconds between two calendars. -
-
-

Arithmetic operations on calendars and periods


-
-Those functions have the same behavious as those defined in - Date_sig.S.
-
val add : t ->
[< Period.date_field ] Period.period -> t
-See also Date_sig.S.add
-
-
val sub : t ->
t ->
[< Period.date_field > `Day `Week ] Period.period
-See also Date_sig.S.sub
-
-
val precise_sub : t -> t -> Period.t
-Since 2.03
-See also Date_sig.S.precise_sub
-
-
val rem : t ->
[< Period.date_field ] Period.period -> t
-See also Date_sig.S.rem
-
-
val next : t -> field -> t
-See also Date_sig.S.next
-
-
val prev : t -> field -> t
-See also Date_sig.S.prev
-
- \ No newline at end of file diff --git a/doc/Calendar_builder.Make_Precise.html b/doc/Calendar_builder.Make_Precise.html deleted file mode 100644 index 451c387..0000000 --- a/doc/Calendar_builder.Make_Precise.html +++ /dev/null @@ -1,422 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Calendar_builder.Make_Precise - - - -

Functor Calendar_builder.Make_Precise

-
module Make_Precise: 
functor (D : Date_sig.S) ->
functor (T : Time_sig.S) -> Calendar_sig.S with module Date = D and module Time = T
-Similar to Calendar_builder.Make but results are more precise. The counterpart is that - some operations are less efficient.
-Since 2.0
-
- - - - - -
Parameters: - - - - - - - -
-D:Date_sig.S -
-T:Time_sig.S -
-
-
-
-

Datatypes


-
module Date: Date_sig.S 
-Date implementation used by this calendar. -
-
module Time: Time_sig.S 
-Time implementation used by this calendar. -
-
type t 
- -
type day = Date.day = 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-| -Sun
-| -Mon
-| -Tue
-| -Wed
-| -Thu
-| -Fri
-| -Sat(*Days of the week.*)
- - -
type month = Date.month = 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-| -Jan
-| -Feb
-| -Mar
-| -Apr
-| -May
-| -Jun
-| -Jul
-| -Aug
-| -Sep
-| -Oct
-| -Nov
-| -Dec(*Months of the year.*)
- - -
type year = Date.year 
-
-Year as an int
-
- -
type second = Time.second 
- -
type field = [ `Day | `Hour | `Minute | `Month | `Second | `Week | `Year ] 
-
-The different fields of a calendar.
-
- -
-

Constructors


-
val make : int -> int -> int -> int -> int -> second -> t
-make year month day hour minute second makes the calendar - "year-month-day; hour-minute-second".
-Raises
  • D.Out_of_bounds when a date is outside the Julian period.
  • -
  • D.Undefined when a date belongs to [October 5th, 1582; October - 14th, 1582].
  • -
-
-
val lmake : year:int ->
?month:int ->
?day:int ->
?hour:int ->
?minute:int -> ?second:second -> unit -> t
-Labelled version of make. - The default value of month and day (resp. of hour, minute - and second) is 1 (resp. 0).
-Since 1.05
-Raises
  • D.Out_of_bounds when a date is outside the Julian period.
  • -
  • D.Undefined when a date belongs to [October 5th, 1582; October - 14th, 1582].
  • -
-
-
val create : Date.t -> Time.t -> t
-create d t creates a calendar from the given date and time.
-
-
val now : unit -> t
-now () returns the current date and time (in the current time - zone).
-
-
val from_jd : float -> t
-Return the Julian day. - More precise than Date.from_jd: the fractional part represents the - time.
-
-
val from_mjd : float -> t
-Return the Modified Julian day. - It is Julian day - 2 400 000.5 (more precise than Date.from_mjd).
-
-
-

Conversions


-
-Those functions have the same behaviour as those defined in - Time_sig.S.
-
val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-See also Time_sig.S.convert
-
-
val to_gmt : t -> t
-See also Time_sig.S.to_gmt
-
-
val from_gmt : t -> t
-See also Time_sig.S.from_gmt
-
-
-

Getters


-
-Those functions have the same behavious as those defined in - Date_sig.S.
-
val days_in_month : t -> int
-
val day_of_week : t -> day
-
val day_of_month : t -> int
-
val day_of_year : t -> int
-
val week : t -> int
-See also Date_sig.S.week
-
-
val month : t -> month
-See also Date_sig.S.month
-
-
val year : t -> int
-See also Date_sig.S.year
-
-
-to_jd and to_mjd are more precise than Date_sig.S.to_jd and - Date_sig.S.to_mjd.
-
val to_jd : t -> float
val to_mjd : t -> float

-Those functions have the same behavious as those defined in - Time_sig.S.
-
val hour : t -> int
-See also Time_sig.S.hour
-
-
val minute : t -> int
-See also Time_sig.S.minute
-
-
val second : t -> second
-See also Time_sig.S.second
-
-
-

Calendars are comparable


-
val equal : t -> t -> bool
-Equality function between two calendars.
-See also Utils.Comparable.equal.
-
-
val compare : t -> t -> int
-Comparison function between two calendars.
-See also Utils.Comparable.compare.
-
-
val hash : t -> int
-Hash function for calendars.
-Since 2.0
-See also Utils.Comparable.hash.
-
-
-Those functions have the same behavious as those defined in - Date_sig.S.
-
val is_leap_day : t -> bool
-
val is_gregorian : t -> bool
-
val is_julian : t -> bool
-
-Those functions have the same behavious as those defined in - Time_sig.S.
-
val is_pm : t -> bool
-See also Time_sig.S.is_pm
-
-
val is_am : t -> bool
-See also Time_sig.S.is_am
-
-
-

Coercions


-
val to_unixtm : t -> Unix.tm
-Convert a calendar into the unix.tm type. - The field isdst is always false. More precise than - Date_sig.S.to_unixtm.
-Since 1.01
-
-
val from_unixtm : Unix.tm -> t
-Inverse of to_unixtm. Assumes the current time zone. - So, The following invariant holds: - hour (from_unixtm u) = u.Unix.tm_hour.
-Since 1.01
-
-
val to_unixfloat : t -> float
-Convert a calendar to a float such than - to_unixfloat (make 1970 1 1 0 0 0) returns 0.0 at UTC. - So such a float is convertible with those of the module Unix. - More precise than Date_sig.S.to_unixfloat.
-Since 1.01
-
-
val from_unixfloat : float -> t
-Inverse of to_unixfloat. Assumes the current time zone. - So, the following invariant holds: - hour (from_unixfloat u) = (Unix.gmtime u).Unix.tm_hour.
-Since 1.01
-
-
val from_date : Date.t -> t
-Convert a date to a calendar. - The time is midnight in the current time zone.
-
-
val to_date : t -> Date.t
-Convert a calendar to a date. Time part of the calendar is ignored.
-
-
val to_time : t -> Time.t
-Convert a calendar to a time. Date part of the calendar is ignored.
-Since 1.03
-
-
-

Period


-
module Period: sig .. end
-A period is the number of seconds between two calendars. -
-
-

Arithmetic operations on calendars and periods


-
-Those functions have the same behavious as those defined in - Date_sig.S.
-
val add : t ->
[< Period.date_field ] Period.period -> t
-See also Date_sig.S.add
-
-
val sub : t ->
t ->
[< Period.date_field > `Day `Week ] Period.period
-See also Date_sig.S.sub
-
-
val precise_sub : t -> t -> Period.t
-Since 2.03
-See also Date_sig.S.precise_sub
-
-
val rem : t ->
[< Period.date_field ] Period.period -> t
-See also Date_sig.S.rem
-
-
val next : t -> field -> t
-See also Date_sig.S.next
-
-
val prev : t -> field -> t
-See also Date_sig.S.prev
-
- \ No newline at end of file diff --git a/doc/Calendar_builder.html b/doc/Calendar_builder.html deleted file mode 100644 index f67bccf..0000000 --- a/doc/Calendar_builder.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -Calendar_builder - - - -

Module Calendar_builder

-
module Calendar_builder: sig .. end
-Generic calendar implementation.
-Since 2.0
-
-
-
module Make: 
functor (D : Date_sig.S) ->
functor (T : Time_sig.S) -> Calendar_sig.S with module Date = D and module Time = T
-Implement a calendar from a date implementation and a time implementation. -
-
module Make_Precise: 
functor (D : Date_sig.S) ->
functor (T : Time_sig.S) -> Calendar_sig.S with module Date = D and module Time = T
-Similar to Calendar_builder.Make but results are more precise. -
- \ No newline at end of file diff --git a/doc/Calendar_sig.S.Date.html b/doc/Calendar_sig.S.Date.html deleted file mode 100644 index 1c23f75..0000000 --- a/doc/Calendar_sig.S.Date.html +++ /dev/null @@ -1,600 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Calendar_sig.S.Date - - - -

Module Calendar_sig.S.Date

-
module Date: Date_sig.S 
-Date implementation used by this calendar.
-Since 2.0
-
-
-
-

Datatypes


-
type field = Period.date_field 
-
-The different fields of a date.
-Since 2.02
-
- -
type -[< field ] date 
-
-Type of a date, without specifying any precision level.
-Since 2.02
-
- -
type t = field date 
-
-Type of a date.
-
- -
type day = 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-| -Sun
-| -Mon
-| -Tue
-| -Wed
-| -Thu
-| -Fri
-| -Sat
- -
-Days of the week.
-
- -
type month = 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-| -Jan
-| -Feb
-| -Mar
-| -Apr
-| -May
-| -Jun
-| -Jul
-| -Aug
-| -Sep
-| -Oct
-| -Nov
-| -Dec
- -
-Months of the year.
-
- -
type year = int 
-
-Year as an int.
-
- -
-

Exceptions


-
exception Out_of_bounds
-
-Raised when a date is outside the Julian period.
-
-
exception Undefined
-
-Raised when a date belongs to - [October 5th, 1582; October 14th, 1582].
-
-
-

Constructors


-
val make : year -> int -> int -> t
-make year month day makes the date year-month-day. A BC year y - corresponds to the year -(y+1).
-Raises
  • Out_of_bounds when a date is outside the Julian period.
  • -
  • Undefined when a date belongs to [October 5th, 1582; October - 14th, 1582].
  • -
-Example: years (5 BC) and (1 BC) respectively correspond to years - (-4) and 0.
-
-
val lmake : year:year -> ?month:int -> ?day:int -> unit -> t
-Labelled version of make. - The default value of month and day is 1.
-Since 1.05
-Raises
  • Out_of_bounds when a date is outside the Julian period.
  • -
  • Undefined when a date belongs to [October 5th, 1582; October - 14th, 1582].
  • -
-
-
val make_year : int -> [< `Year ] date
-make_year y makes a date only represented by its year y. The month - and the day of such a date are not relevant.
-Since 2.02
-
-
val make_year_month : int -> int -> [< `Month | `Year ] date
-make_year_month y m makes a date only represented by its year y and - its month m. The day of such a date is not relevant.
-Since 2.02
-
-
val today : unit -> t
-Date of the current day (based on Time_Zone.current ()).
-
-
val from_jd : int -> t
-Make a date from its Julian day.
-Example: from_jd 0 returns the date 4713 BC-1-1.
-
-
val from_mjd : int -> t
-Make a date from its modified Julian day (i.e. Julian day - 2 400 001). - The Modified Julian day is more manageable than the Julian day.
-Example: from_mjd 0 returns the date 1858-11-17.
-
-
val from_day_of_year : year -> int -> t
-Make a date from a year and its day of the year.
-Since 2.0
-Example: from_day_of_year 2008 39 returns the date 2008-2-8.
-
-
-

Getters


-
val days_in_month : [< field > `Month `Year ] date -> int
-Number of days in the month of a date.
-Example: days_in_month (make 2003 6 26) returns 30.
-
-
val day_of_week : t -> day
-Day of the week.
-Example: day_of_week (make 2003 6 26) returns Thu.
-
-
val day_of_month : t -> int
-Day of the month.
-Example: day_of_month (make 2003 6 26) returns 26.
-
-
val day_of_year : t -> int
-Day of the year.
-Examples:
  • day_of_year (make 2003 12 28) returns 362.
    -
  • day_of_year (make 2003 1 5) returns 5
    -
-
val week : t -> int
-Week.
-Examples:
  • week (make 2003 12 29) returns 1.
    -
  • week (make 2003 12 28) returns 52.
    -
  • week (make 2000 1 2) returns 52.
    -
  • week (make 2000 1 3) returns 1.
    -
-
val month : [< field > `Month ] date -> month
-Month.
-Example: month (make 2003 6 26) returns Jun.
-
-
val year : [< field > `Year ] date -> year
-Year.
-Example: year (make 2003 6 26) returns 2003.
-
-
val to_jd : t -> int
-Julian day.
-Example: to_jd (make (-4712) 1 1) returns 0.
-
-
val to_mjd : t -> int
-Modified Julian day (i.e. Julian day - 2 400 001). - The Modified Julian day is more manageable than the Julian day.
-Example: to_mjd (make 1858 11 17) returns 0.
-
-
-

Dates are comparable


-
val equal : [< field ] date ->
[< field ] date -> bool
-Equality function between two dates.
-Since 1.09.0
-See also Utils.Comparable.equal
-
-
val compare : [< field ] date ->
[< field ] date -> int
-Comparison function between two dates.
-See also Utils.Comparable.compare
-
-
val hash : [< field ] date -> int
-Hash function for dates.
-Since 2.0
-See also Utils.Comparable.hash
-
-
-

Boolean operations on dates


-
val is_valid_date : year -> int -> int -> bool
-Check if a date is valid, that is the date has not been coerced to look - like a real date.
-Since 2.0
-Examples:
  • is_valid_date 2008 2 30 returns false
    -
  • is_valid_date 2008 2 8 returns true
    -
-
val is_leap_day : t -> bool
-Return true if a date is a leap day - (i.e. February, 24th of a leap year); false otherwise.
-
-
val is_gregorian : t -> bool
-Return true if a date belongs to the Gregorian calendar; - false otherwise.
-
-
val is_julian : t -> bool
-Return true iff a date belongs to the Julian calendar; - false otherwise.
-
-
-

Coercions


-
val to_unixtm : t -> Unix.tm
-Convert a date into the Unix.tm type. - The field is_isdst is always false. The fields Unix.tm_sec, - Unix.tm_min and Unix.tm_hour are irrelevant.
-Since 1.01
-
-
val from_unixtm : Unix.tm -> t
-Inverse of to_unixtm. Assume the current time zone.
-Since 1.01
-
-
val to_unixfloat : t -> float
-Convert a date to a float such than to_unixfloat (make 1970 1 1) - returns 0.0. So such a float is convertible with those of the Unix - module. The fractional part of the result is always 0.
-Since 1.01
-
-
val from_unixfloat : float -> t
-Inverse of to_unixfloat. Ignore the fractional part of the argument. - Assume the current time zone.
-Since 1.01
-
-
val to_business : t -> year * int * day
-Return the "business week" and the day in this week respecting ISO 8601. - Notice that business weeks at the beginning and end of the year can - sometimes have year numbers which don't match the real year.
-Since 1.09.0
-Examples:
  • to_business (make 2003 12 29) returns 2004, 1, Mon.
    -
  • to_business (make 2003 12 28) returns 2003, 52, Sun
    -
  • to_business (make 2000 1 2) returns 1999, 52, Sun
    -
  • to_business (make 2000 1 3) returns 2000, 1, Mon
    -
-
val from_business : year -> int -> day -> t
-Inverse of to_business respecting ISO-8601. - Notice that business weeks at the beginning and end of the year - can sometimes have year numbers which don't match the real year.
-Since 1.09.0
-Raises Invalid_argument if the date is bad.
-
-
val int_of_day : day -> int
-Convert a day to an integer respecting ISO-8601. - So, Monday is 1, Tuesday is 2, ..., and sunday is 7.
-
-
val day_of_int : int -> day
-Inverse of int_of_day.
-Raises Invalid_argument if the argument does not belong to 1; 7.
-
-
val int_of_month : month -> int
-Convert a month to an integer respecting ISO-8601. - So, January is 1, February is 2 and so on.
-
-
val month_of_int : int -> month
-Inverse of int_of_month.
-Raises Invalid_argument if the argument does not belong to 1; 12.
-
-
-

Period


-
module Period: sig .. end
-A period is the number of days between two dates. -
-
-

Arithmetic operations on dates and periods


-
val add : ([< field ] as 'a) date ->
'a Period.period -> 'a date
-add d p returns d + p.
-Raises
  • Out_of_bounds when the resulting date is outside the Julian - period.
  • -
  • Undefined when the resulting date belongs to [October 5th, - 1582; October 14th, 1582].
  • -
-Examples:
  • add (make 2003 12 31) (Period.month 2) returns the date - 2004-3-2 (following the coercion rule describes in the introduction).
    -
  • add (make 2003 12 31) (Period.month 1) returns the date - 2004-1-31
    -
-
val sub : ([< field ] as 'a) date ->
'a date ->
[< field > `Day `Week ] Period.period
-sub d1 d2 returns the period between d1 and d2.
-
-
val precise_sub : ([< field ] as 'a) date ->
'a date -> Period.t
-precise_sub d1 d2 returns the period between d1 and d2. - It is equivalent to sub, but:
    -
  • the period is expressed with a number of years, months and days, not - only with a number of days;
  • -
  • it is less efficient.
  • -
-
-Since 2.03
-
-
val rem : ([< field ] as 'a) date ->
'a Period.period -> 'a date
-rem d p is equivalent to add d (Period.opp p).
-Raises
  • Out_of_bounds when the resulting date is outside the Julian - period.
  • -
  • Undefined when the resulting date belongs to [October 5th, - 1582; October 14th, 1582].
  • -
-
-
val next : ([< field ] as 'a) date -> 'a -> 'a date
-next d f returns the date corresponding to the next specified field.
-Raises
  • Out_of_bounds when the resulting date is outside the Julian - period.
  • -
  • Undefined when the resulting date belongs to [October 5th, - 1582; October 14th, 1582].
  • -
-Example: next (make 2003 12 31) `Month returns the date 2004-1-31 - (i.e. one month later).
-
-
val prev : ([< field ] as 'a) date -> 'a -> 'a date
-prev d f returns the date corresponding to the previous specified - field.
-Raises
  • Out_of_bounds when the resulting date is outside the Julian - period.
  • -
  • Undefined when the resulting date belongs to [October 5th, - 1582; October 14th, 1582].
  • -
-Example: prev (make 2003 12 31) `Year returns the date 2002-12-31 - (i.e. one year ago).
-
-
-

Operations on years


-
val is_leap_year : year -> bool
-Return true if a year is a leap year; false otherwise.
-
-
val same_calendar : year -> year -> bool
-Return true if two years have the same calendar; false - otherwise.
-
-
val days_in_year : ?month:month -> year -> int
-Number of days in a year. -

- - days_in_year ~month y returns the number of days in the year y up - to the end of the given month. Thus days_in_year ~month:Dec y is the - same as days_in_year y.
-

-
val weeks_in_year : year -> int
-Number of weeks in a year.
-
-
val week_first_last : int -> year -> t * t
-Return the first and last days of a week in a year.
-Since 1.08
-
-
val nth_weekday_of_month : year -> month -> day -> int -> t
-nth_weekday_of_month y m d n returns the n-th day d in the month - m of the year y (for instance the 3rd Thursday of the month).
-Since 1.09.0
-
-
val century : year -> int
-Century of a year.
-Examples:
  • century 2001 returns 21.
    -
  • century 2000 returns 20
    -
-
val millenium : year -> int
-Millenium of a year.
-Examples:
  • millenium 2001 returns 3.
    -
  • millenium 2000 returns 2
    -
-
val solar_number : year -> int
-Solar number. -

- - In the Julian calendar there is a one-to-one relationship between the - Solar number and the day on which a particular date falls.
-

-
val indiction : year -> int
-Indiction. -

- - The Indiction was used in the middle ages to specify the position of a - year in a 15 year taxation cycle. It was introduced by emperor - Constantine the Great on 1 September 312 and ceased to be used in - 1806. -

- - The Indiction has no astronomical significance.
-

-
val golden_number : year -> int
-Golden number. -

- - Considering that the relationship between the moon's phases and the - days of the year repeats itself every 19 years, it is natural to - associate a number between 1 and 19 with each year. - This number is the so-called Golden number.
-

-
val epact : year -> int
-Epact. -

- - The Epact is a measure of the age of the moon (i.e. the number of days - that have passed since an "official" new moon) on a particular date.
-

-
val easter : year -> t
-Easter Sunday. -

- - In the Christian world, Easter (and the days immediately preceding it) - is the celebration of the death and resurrection of Jesus in - (approximately) AD 30.
-

-
val carnaval : year -> t
-Carnaval Monday. carnaval y is easter y - 48.
-Since 1.09.0
-
-
val mardi_gras : year -> t
-Mardi Gras. mardi_gras y is easter y - 47.
-Since 1.09.0
-
-
val ash : year -> t
-Ash Wednesday. ash y is easter y - 46.
-Since 1.09.0
-
-
val palm : year -> t
-Palm Sunday. palm y is easter y - 7.
-Since 1.09.0
-
-
val easter_friday : year -> t
-Easter Friday. easter_friday y is easter y - 2.
-Since 1.09.0
-
-
val easter_saturday : year -> t
-Easter Saturday. easter_saturday y is easter y - 1.
-Since 1.09.0
-
-
val easter_monday : year -> t
-Easter Monday. easter_monday y is easter y + 1.
-Since 1.09.0
-
-
val ascension : year -> t
-Ascension. ascension y is easter y + 39.
-Since 1.09.0
-
-
val withsunday : year -> t
-Withsunday. withsunday y is easter y + 49.
-Since 1.09.0
-
-
val withmonday : year -> t
-Withmonday. withmonday y is easter y + 50.
-Since 1.09.0
-
-
val corpus_christi : year -> t
-Feast of Corpus Christi. corpus_christi y is easter + 60.
-Since 1.09.0
-
- \ No newline at end of file diff --git a/doc/Calendar_sig.S.Period.html b/doc/Calendar_sig.S.Period.html deleted file mode 100644 index ba91b52..0000000 --- a/doc/Calendar_sig.S.Period.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Calendar_sig.S.Period - - - -

Module Calendar_sig.S.Period

-
module Period: sig .. end
-A period is the number of seconds between two calendars.
-
-
-
-

Arithmetic operations


-
type +[< Period.date_field ] period 
- -
type t = Period.date_field period 
-
-Type of a period.
-
- -
-

Period is an additive monoid


-
val empty : [< Period.date_field ] period
-The empty period.
-
-
val add : ([< Period.date_field > `Day `Week ] as 'a) period ->
'a period -> 'a period
-Addition of periods.
-
-
val sub : ([< Period.date_field > `Day `Week ] as 'a) period ->
'a period -> 'a period
-Substraction of periods.
-
-
val opp : ([< Period.date_field > `Day `Week ] as 'a) period ->
'a period
-Opposite of a period.
-
-
-

Periods are comparable


-
val equal : [< Period.date_field ] period ->
[< Period.date_field ] period -> bool
-Equality function between two periods.
-Since 1.09.0
-See also Utils.Comparable.equal
-
-
val compare : [< Period.date_field ] period ->
[< Period.date_field ] period -> int
-Comparison function between two periods.
-See also Utils.Comparable.compare
-
-
val hash : [< Period.date_field ] period -> int
-Hash function for periods.
-Since 2.0
-See also Utils.Comparable.hash
-
-
-

Constructors


-
val make : int ->
int -> int -> int -> int -> Calendar_sig.S.second -> t
-make year month day hour minute second makes a period of the - specified length.
-
-
val lmake : ?year:int ->
?month:int ->
?day:int ->
?hour:int ->
?minute:int ->
?second:Calendar_sig.S.second -> unit -> t
-Labelled version of make. - The default value of each argument is 0.
-
-
-Those functions have the same behavious as those defined in - Date_sig.S.Period.
-
val year : int -> [< Period.date_field > `Year ] period
-
val month : int -> [< Period.date_field > `Month `Year ] period
-
val week : int -> [< Period.date_field > `Day `Week ] period
-
val day : int -> [< Period.date_field > `Day `Week ] period
-
-Those functions have the same behavious as those defined in - .
-
val hour : int -> [< Period.date_field > `Day `Week ] period
-
val minute : int -> [< Period.date_field > `Day `Week ] period
-
val second : Calendar_sig.S.second ->
[< Period.date_field > `Day `Week ] period
-
-

Coercions


-
val from_date : ([< Period.date_field ] as 'a) Date.Period.period ->
'a period
-Convert a date period to a calendar period.
-
-
val from_time : ([< Period.date_field ] as 'a) Time.Period.period ->
'a period
-Convert a time period to a calendar period.
-
-
val to_date : ([< Date.field ] as 'a) period -> 'a Date.Period.period
-Convert a calendar period to a date period. - The fractional time period is ignored.
-Example: to_date (hour 60) is equivalent to Date.Period.days 2.
-
-
exception Not_computable
-
-= Date.Period.Not_computable.
-Since 1.04
-
-
val to_time : ([< Period.date_field ] as 'a) period ->
'a Time.Period.period
-Deprecated.since 2.02: use Calendar_sig.S.Period.safe_to_time instead
-Convert a calendar period to a date period.
-Since 1.04
-Raises Not_computable if the time period is not computable.
-Examples:
  • to_time (year 1) raises Not_computable because - a year is not a constant number of days.
    -
  • to_time (second 30) returns a time period of 30 seconds
    -
  • to_time (day 6) returns a time period of 24 * 3600 * 6 = - 518400 seconds
    -
-
val safe_to_time : ([< `Day | `Week ] as 'a) period ->
'a Time.Period.period
-Equivalent to Calendar_sig.S.Period.to_time but never raises any exception.
-Since 2.02
-
-
val ymds : [< Period.date_field ] period ->
int * int * int * Calendar_sig.S.second
-Number of years, months, days and seconds in a period.
-Since 1.09.0
-Examples:
  • ymds (make (-1) (-2) (-3) (-1) (-2) (-3) returns - -1, -2, -4, 82677.
    -
  • ymds (make 1 2 3 1 2 3) returns 1, 2, 3, 3723
    -
- \ No newline at end of file diff --git a/doc/Calendar_sig.S.Time.html b/doc/Calendar_sig.S.Time.html deleted file mode 100644 index 070edc2..0000000 --- a/doc/Calendar_sig.S.Time.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Calendar_sig.S.Time - - - -

Module Calendar_sig.S.Time

-
module Time: Time_sig.S 
-Time implementation used by this calendar.
-Since 2.0
-
-
-
-

Datatypes


-
type t 
-
-Type of a time.
-
- -
type field = [ `Hour | `Minute | `Second ] 
-
-The different fields of a time.
-
- -
-

Second


-
type second 
-
-Type of a second.
-Since 2.0 (was an integer in previous versions).
-
- -
module Second: Time_sig.Second  with type t = second
-Second implementation -
-
-

Constructors


-
val make : int -> int -> second -> t
-make hour minute second makes the time hour-minute-second.
-
-
val lmake : ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-Labelled version of make. The default value is 0 for each argument.
-Since 1.05
-
-
val now : unit -> t
-The current time based on Time_Zone.current ().
-
-
val midnight : unit -> t
-midnight () is midnight (expressed in the current time zone). - So, it has always the same behaviour as make 0 0 0.
-
-
val midday : unit -> t
-midday () is midday (expressed in the current time zone). - So, it has always the same behaviour as make 12 0 0.
-
-
-

Conversions


-
val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-convert t t1 t2 converts the time t expressed in the time zone t1 - to the same time expressed in the time zone t2.
-Example: convert (make 20 0 0) (Time_Zone.GMT_Plus 2) - (Time_Zone.GMT_Plus 4) returns the time 22-0-0.
-
-
val from_gmt : t -> t
-from_gmt t is equivalent to - convert t Time_Zone.GMT (Time_Zone.current ()).
-
-
val to_gmt : t -> t
-to_gmt t is equivalent to - convert t (Time_Zone.current ()) Time_Zone.GMT.
-
-
val normalize : t -> t * int
-normalize t returns t such that hour t belongs to [0; 24[. The - second component of the result is the number of days needed by the - modification.
-Example: normalize (make 22 0 0) returns the time 22-0-0 and 0, - normalize (make 73 0 0) returns the time 1-0-0 and 3 and normalize - (make (-73) 0 0) returns the time 23-0-0 and (-4).
-
-
-

Getters


-
val hour : t -> int
-Hour.
-Example: hour (make 20 0 0) returns 20.
-
-
val minute : t -> int
-Minute.
-Example: minute (make 20 10 0) returns 10.
-
-
val second : t -> second
-Second.
-Example: second (make 20 10 5) returns 5.
-
-
val to_seconds : t -> second
-Number of seconds of a time.
-Example: to_seconds (make 1 2 3) returns 3600 + 120 + 3 = 3723.
-
-
val to_minutes : t -> float
-Number of minutes of a time. The resulting fractional part represents - seconds.
-Example: to_minutes (make 1 2 3) returns 60+2+0.05 = 62.05.
-
-
val to_hours : t -> float
-Number of hours of a time. The resulting fractional part represents - minutes and seconds.
-Example: to_hours (make 1 3 0) returns 1 + 0.05 = 1.05.
-
-
-

Times are comparable


-
val equal : t -> t -> bool
-Equality function between two times.
-Since 1.09.0
-See also Utils.Comparable.equal.
-
-
val compare : t -> t -> int
-Comparison function between two times.
-See also Utils.Comparable.compare.
-
-
val hash : t -> int
-Hash function for times.
-Since 2.0
-See also Utils.Comparable.hash.
-
-
-

Boolean operations on times


-
val is_pm : t -> bool
-Return true is the time is before midday in the current time zone; - false otherwise.
-Example: both is_pm (make 10 0 0) and is_pm (make 34 0 0) return - true.
-
-
val is_am : t -> bool
-Return true is the time is after midday in the current time zone; - false otherwise.
-Example: both is_am (make 20 0 0) and is_am (make 44 0 0) return - true.
-
-
-

Coercions


-
val from_seconds : second -> t
-Inverse of to_seconds.
-
-
val from_minutes : float -> t
-Inverse of to_minutes.
-
-
val from_hours : float -> t
-Inverse of to_hours.
-
-
-

Period


-
module Period: sig .. end
-A period is the number of seconds between two times. -
-
-

Arithmetic operations on times and periods


-
val add : t ->
[< Period.date_field ] Period.period -> t
-app t p returns t + p.
-Example: add (make 20 0 0) (Period.minute 70) returns the time - 21:10:0.
-
-
val sub : t ->
t -> [< Period.date_field ] Period.period
-sub t1 t2 returns the period between t1 and t2.
-
-
val rem : t ->
[< Period.date_field ] Period.period -> t
-rem t p is equivalent to add t (Period.opp p).
-
-
val next : t -> field -> t
-next t f returns the time corresponding to the next specified field.
-Example: next (make 20 3 31) `Minute returns the time 20:04:31. - (i.e. one minute later).
-
-
val prev : t -> field -> t
-prev t f returns the time corresponding to the previous specified - field.
-Example: prev (make 20 3 31) `Second returns the time 20:03:30 - (i.e. one second ago).
-
- \ No newline at end of file diff --git a/doc/Calendar_sig.S.html b/doc/Calendar_sig.S.html deleted file mode 100644 index b13f721..0000000 --- a/doc/Calendar_sig.S.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Calendar_sig.S - - - -

Module type Calendar_sig.S

-
module type S = sig .. end
-Common operations for all calendar representations.
-Since 2.0 (this signature was before inlined in interface of Calendar).
-
-
-
-

Datatypes


-
module Date: Date_sig.S 
-Date implementation used by this calendar. -
-
module Time: Time_sig.S 
-Time implementation used by this calendar. -
-
type t 
- -
type day = Date.day = 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-| -Sun
-| -Mon
-| -Tue
-| -Wed
-| -Thu
-| -Fri
-| -Sat(*Days of the week.*)
- - -
type month = Date.month = 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-| -Jan
-| -Feb
-| -Mar
-| -Apr
-| -May
-| -Jun
-| -Jul
-| -Aug
-| -Sep
-| -Oct
-| -Nov
-| -Dec(*Months of the year.*)
- - -
type year = Date.year 
-
-Year as an int
-
- -
type second = Time.second 
- -
type field = [ `Day | `Hour | `Minute | `Month | `Second | `Week | `Year ] 
-
-The different fields of a calendar.
-
- -
-

Constructors


-
val make : int -> int -> int -> int -> int -> second -> t
-make year month day hour minute second makes the calendar - "year-month-day; hour-minute-second".
-Raises
  • D.Out_of_bounds when a date is outside the Julian period.
  • -
  • D.Undefined when a date belongs to [October 5th, 1582; October - 14th, 1582].
  • -
-
-
val lmake : year:int ->
?month:int ->
?day:int ->
?hour:int ->
?minute:int -> ?second:second -> unit -> t
-Labelled version of make. - The default value of month and day (resp. of hour, minute - and second) is 1 (resp. 0).
-Since 1.05
-Raises
  • D.Out_of_bounds when a date is outside the Julian period.
  • -
  • D.Undefined when a date belongs to [October 5th, 1582; October - 14th, 1582].
  • -
-
-
val create : Date.t -> Time.t -> t
-create d t creates a calendar from the given date and time.
-
-
val now : unit -> t
-now () returns the current date and time (in the current time - zone).
-
-
val from_jd : float -> t
-Return the Julian day. - More precise than Date.from_jd: the fractional part represents the - time.
-
-
val from_mjd : float -> t
-Return the Modified Julian day. - It is Julian day - 2 400 000.5 (more precise than Date.from_mjd).
-
-
-

Conversions


-
-Those functions have the same behaviour as those defined in - Time_sig.S.
-
val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-See also Time_sig.S.convert
-
-
val to_gmt : t -> t
-See also Time_sig.S.to_gmt
-
-
val from_gmt : t -> t
-See also Time_sig.S.from_gmt
-
-
-

Getters


-
-Those functions have the same behavious as those defined in - Date_sig.S.
-
val days_in_month : t -> int
-
val day_of_week : t -> day
-
val day_of_month : t -> int
-
val day_of_year : t -> int
-
val week : t -> int
-See also Date_sig.S.week
-
-
val month : t -> month
-See also Date_sig.S.month
-
-
val year : t -> int
-See also Date_sig.S.year
-
-
-to_jd and to_mjd are more precise than Date_sig.S.to_jd and - Date_sig.S.to_mjd.
-
val to_jd : t -> float
val to_mjd : t -> float

-Those functions have the same behavious as those defined in - Time_sig.S.
-
val hour : t -> int
-See also Time_sig.S.hour
-
-
val minute : t -> int
-See also Time_sig.S.minute
-
-
val second : t -> second
-See also Time_sig.S.second
-
-
-

Calendars are comparable


-
val equal : t -> t -> bool
-Equality function between two calendars.
-See also Utils.Comparable.equal.
-
-
val compare : t -> t -> int
-Comparison function between two calendars.
-See also Utils.Comparable.compare.
-
-
val hash : t -> int
-Hash function for calendars.
-Since 2.0
-See also Utils.Comparable.hash.
-
-
-Those functions have the same behavious as those defined in - Date_sig.S.
-
val is_leap_day : t -> bool
-
val is_gregorian : t -> bool
-
val is_julian : t -> bool
-
-Those functions have the same behavious as those defined in - Time_sig.S.
-
val is_pm : t -> bool
-See also Time_sig.S.is_pm
-
-
val is_am : t -> bool
-See also Time_sig.S.is_am
-
-
-

Coercions


-
val to_unixtm : t -> Unix.tm
-Convert a calendar into the unix.tm type. - The field isdst is always false. More precise than - Date_sig.S.to_unixtm.
-Since 1.01
-
-
val from_unixtm : Unix.tm -> t
-Inverse of to_unixtm. Assumes the current time zone. - So, The following invariant holds: - hour (from_unixtm u) = u.Unix.tm_hour.
-Since 1.01
-
-
val to_unixfloat : t -> float
-Convert a calendar to a float such than - to_unixfloat (make 1970 1 1 0 0 0) returns 0.0 at UTC. - So such a float is convertible with those of the module Unix. - More precise than Date_sig.S.to_unixfloat.
-Since 1.01
-
-
val from_unixfloat : float -> t
-Inverse of to_unixfloat. Assumes the current time zone. - So, the following invariant holds: - hour (from_unixfloat u) = (Unix.gmtime u).Unix.tm_hour.
-Since 1.01
-
-
val from_date : Date.t -> t
-Convert a date to a calendar. - The time is midnight in the current time zone.
-
-
val to_date : t -> Date.t
-Convert a calendar to a date. Time part of the calendar is ignored.
-
-
val to_time : t -> Time.t
-Convert a calendar to a time. Date part of the calendar is ignored.
-Since 1.03
-
-
-

Period


-
module Period: sig .. end
-A period is the number of seconds between two calendars. -
-
-

Arithmetic operations on calendars and periods


-
-Those functions have the same behavious as those defined in - Date_sig.S.
-
val add : t ->
[< Period.date_field ] Period.period -> t
-See also Date_sig.S.add
-
-
val sub : t ->
t ->
[< Period.date_field > `Day `Week ] Period.period
-See also Date_sig.S.sub
-
-
val precise_sub : t -> t -> Period.t
-Since 2.03
-See also Date_sig.S.precise_sub
-
-
val rem : t ->
[< Period.date_field ] Period.period -> t
-See also Date_sig.S.rem
-
-
val next : t -> field -> t
-See also Date_sig.S.next
-
-
val prev : t -> field -> t
-See also Date_sig.S.prev
-
- \ No newline at end of file diff --git a/doc/Calendar_sig.html b/doc/Calendar_sig.html deleted file mode 100644 index 7447f4f..0000000 --- a/doc/Calendar_sig.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -Calendar_sig - - - -

Module Calendar_sig

-
module Calendar_sig: sig .. end
-Calendar interface. A calendar combines a date and a time: it may be seen - as a 6-uple (year, month, day, hour, minute, second). -

- - If you only need operations on dates, you should better use a date - implementation (like module Date). But if you need to manage more precise - dates, use this module. The exact Julian period is now [January, 1st 4713 - BC at midday GMT; January 22th, 3268 AC at midday GMT].
-

-
-
module type S = sig .. end
-Common operations for all calendar representations. -
- \ No newline at end of file diff --git a/doc/Date.html b/doc/Date.html deleted file mode 100644 index ccf331c..0000000 --- a/doc/Date.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -Date - - - -

Module Date

-
module Date: sig .. end
-Date implementation.
-
-
-
include Date_sig.S
- \ No newline at end of file diff --git a/doc/Date_sig.S.Period.html b/doc/Date_sig.S.Period.html deleted file mode 100644 index b5c7fed..0000000 --- a/doc/Date_sig.S.Period.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Date_sig.S.Period - - - -

Module Date_sig.S.Period

-
module Period: sig .. end
-A period is the number of days between two dates.
-
-
-
-

Arithmetic operations


-
type +[< Date_sig.S.field ] p 
- -
include Period.S
-
-

Constructors


-
val make : int -> int -> int -> Date_sig.S.t
-make year month day makes a period of the specified length.
-
-
val lmake : ?year:int -> ?month:int -> ?day:int -> unit -> Date_sig.S.t
-Labelled version of make. - The default value of each argument is 0.
-
-
val year : int -> [< Date_sig.S.field > `Year ] period
-year n makes a period of n years.
-
-
val month : int -> [< Date_sig.S.field > `Month `Year ] period
-month n makes a period of n months.
-
-
val week : int -> [< Date_sig.S.field > `Day `Week ] period
-week n makes a period of n weeks.
-
-
val day : int -> [< Date_sig.S.field > `Day `Week ] period
-day n makes a period of n days.
-
-
-

Getters


-
exception Not_computable
-
-Since 1.04
-
-
val nb_days : [< Date_sig.S.field ] period -> int
-Deprecated.since 2.02: use Date_sig.S.Period.safe_nb_days instead
-Number of days in a period.
-Since 1.04
-Raises Not_computable if the number of days is not computable.
-Examples:
  • nb_days (year 1) raises Not_computable because a year is - not a constant number of days.
    -
  • nb_days (day 6) returns 6
    -
-
val safe_nb_days : [< `Day | `Week ] period -> int
-Equivalent to Date_sig.S.Period.nb_days but never raises any exception.
-Since 2.02
-
-
val ymd : [< Date_sig.S.field ] period -> int * int * int
-Number of years, months and days in a period.
-Since 1.09.0
-Example: ymd (make 1 2 3) returns 1, 2, 3.
-
- \ No newline at end of file diff --git a/doc/Date_sig.S.html b/doc/Date_sig.S.html deleted file mode 100644 index 0ea51e9..0000000 --- a/doc/Date_sig.S.html +++ /dev/null @@ -1,598 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Date_sig.S - - - -

Module type Date_sig.S

-
module type S = sig .. end
-Common operations for all date representations.
-Since 2.0 (this signature was before inlined in interface of Date).
-
-
-
-

Datatypes


-
type field = Period.date_field 
-
-The different fields of a date.
-Since 2.02
-
- -
type -[< field ] date 
-
-Type of a date, without specifying any precision level.
-Since 2.02
-
- -
type t = field date 
-
-Type of a date.
-
- -
type day = 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-| -Sun
-| -Mon
-| -Tue
-| -Wed
-| -Thu
-| -Fri
-| -Sat
- -
-Days of the week.
-
- -
type month = 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-| -Jan
-| -Feb
-| -Mar
-| -Apr
-| -May
-| -Jun
-| -Jul
-| -Aug
-| -Sep
-| -Oct
-| -Nov
-| -Dec
- -
-Months of the year.
-
- -
type year = int 
-
-Year as an int.
-
- -
-

Exceptions


-
exception Out_of_bounds
-
-Raised when a date is outside the Julian period.
-
-
exception Undefined
-
-Raised when a date belongs to - [October 5th, 1582; October 14th, 1582].
-
-
-

Constructors


-
val make : year -> int -> int -> t
-make year month day makes the date year-month-day. A BC year y - corresponds to the year -(y+1).
-Raises
  • Out_of_bounds when a date is outside the Julian period.
  • -
  • Undefined when a date belongs to [October 5th, 1582; October - 14th, 1582].
  • -
-Example: years (5 BC) and (1 BC) respectively correspond to years - (-4) and 0.
-
-
val lmake : year:year -> ?month:int -> ?day:int -> unit -> t
-Labelled version of make. - The default value of month and day is 1.
-Since 1.05
-Raises
  • Out_of_bounds when a date is outside the Julian period.
  • -
  • Undefined when a date belongs to [October 5th, 1582; October - 14th, 1582].
  • -
-
-
val make_year : int -> [< `Year ] date
-make_year y makes a date only represented by its year y. The month - and the day of such a date are not relevant.
-Since 2.02
-
-
val make_year_month : int -> int -> [< `Month | `Year ] date
-make_year_month y m makes a date only represented by its year y and - its month m. The day of such a date is not relevant.
-Since 2.02
-
-
val today : unit -> t
-Date of the current day (based on Time_Zone.current ()).
-
-
val from_jd : int -> t
-Make a date from its Julian day.
-Example: from_jd 0 returns the date 4713 BC-1-1.
-
-
val from_mjd : int -> t
-Make a date from its modified Julian day (i.e. Julian day - 2 400 001). - The Modified Julian day is more manageable than the Julian day.
-Example: from_mjd 0 returns the date 1858-11-17.
-
-
val from_day_of_year : year -> int -> t
-Make a date from a year and its day of the year.
-Since 2.0
-Example: from_day_of_year 2008 39 returns the date 2008-2-8.
-
-
-

Getters


-
val days_in_month : [< field > `Month `Year ] date -> int
-Number of days in the month of a date.
-Example: days_in_month (make 2003 6 26) returns 30.
-
-
val day_of_week : t -> day
-Day of the week.
-Example: day_of_week (make 2003 6 26) returns Thu.
-
-
val day_of_month : t -> int
-Day of the month.
-Example: day_of_month (make 2003 6 26) returns 26.
-
-
val day_of_year : t -> int
-Day of the year.
-Examples:
  • day_of_year (make 2003 12 28) returns 362.
    -
  • day_of_year (make 2003 1 5) returns 5
    -
-
val week : t -> int
-Week.
-Examples:
  • week (make 2003 12 29) returns 1.
    -
  • week (make 2003 12 28) returns 52.
    -
  • week (make 2000 1 2) returns 52.
    -
  • week (make 2000 1 3) returns 1.
    -
-
val month : [< field > `Month ] date -> month
-Month.
-Example: month (make 2003 6 26) returns Jun.
-
-
val year : [< field > `Year ] date -> year
-Year.
-Example: year (make 2003 6 26) returns 2003.
-
-
val to_jd : t -> int
-Julian day.
-Example: to_jd (make (-4712) 1 1) returns 0.
-
-
val to_mjd : t -> int
-Modified Julian day (i.e. Julian day - 2 400 001). - The Modified Julian day is more manageable than the Julian day.
-Example: to_mjd (make 1858 11 17) returns 0.
-
-
-

Dates are comparable


-
val equal : [< field ] date ->
[< field ] date -> bool
-Equality function between two dates.
-Since 1.09.0
-See also Utils.Comparable.equal
-
-
val compare : [< field ] date ->
[< field ] date -> int
-Comparison function between two dates.
-See also Utils.Comparable.compare
-
-
val hash : [< field ] date -> int
-Hash function for dates.
-Since 2.0
-See also Utils.Comparable.hash
-
-
-

Boolean operations on dates


-
val is_valid_date : year -> int -> int -> bool
-Check if a date is valid, that is the date has not been coerced to look - like a real date.
-Since 2.0
-Examples:
  • is_valid_date 2008 2 30 returns false
    -
  • is_valid_date 2008 2 8 returns true
    -
-
val is_leap_day : t -> bool
-Return true if a date is a leap day - (i.e. February, 24th of a leap year); false otherwise.
-
-
val is_gregorian : t -> bool
-Return true if a date belongs to the Gregorian calendar; - false otherwise.
-
-
val is_julian : t -> bool
-Return true iff a date belongs to the Julian calendar; - false otherwise.
-
-
-

Coercions


-
val to_unixtm : t -> Unix.tm
-Convert a date into the Unix.tm type. - The field is_isdst is always false. The fields Unix.tm_sec, - Unix.tm_min and Unix.tm_hour are irrelevant.
-Since 1.01
-
-
val from_unixtm : Unix.tm -> t
-Inverse of to_unixtm. Assume the current time zone.
-Since 1.01
-
-
val to_unixfloat : t -> float
-Convert a date to a float such than to_unixfloat (make 1970 1 1) - returns 0.0. So such a float is convertible with those of the Unix - module. The fractional part of the result is always 0.
-Since 1.01
-
-
val from_unixfloat : float -> t
-Inverse of to_unixfloat. Ignore the fractional part of the argument. - Assume the current time zone.
-Since 1.01
-
-
val to_business : t -> year * int * day
-Return the "business week" and the day in this week respecting ISO 8601. - Notice that business weeks at the beginning and end of the year can - sometimes have year numbers which don't match the real year.
-Since 1.09.0
-Examples:
  • to_business (make 2003 12 29) returns 2004, 1, Mon.
    -
  • to_business (make 2003 12 28) returns 2003, 52, Sun
    -
  • to_business (make 2000 1 2) returns 1999, 52, Sun
    -
  • to_business (make 2000 1 3) returns 2000, 1, Mon
    -
-
val from_business : year -> int -> day -> t
-Inverse of to_business respecting ISO-8601. - Notice that business weeks at the beginning and end of the year - can sometimes have year numbers which don't match the real year.
-Since 1.09.0
-Raises Invalid_argument if the date is bad.
-
-
val int_of_day : day -> int
-Convert a day to an integer respecting ISO-8601. - So, Monday is 1, Tuesday is 2, ..., and sunday is 7.
-
-
val day_of_int : int -> day
-Inverse of int_of_day.
-Raises Invalid_argument if the argument does not belong to 1; 7.
-
-
val int_of_month : month -> int
-Convert a month to an integer respecting ISO-8601. - So, January is 1, February is 2 and so on.
-
-
val month_of_int : int -> month
-Inverse of int_of_month.
-Raises Invalid_argument if the argument does not belong to 1; 12.
-
-
-

Period


-
module Period: sig .. end
-A period is the number of days between two dates. -
-
-

Arithmetic operations on dates and periods


-
val add : ([< field ] as 'a) date ->
'a Period.period -> 'a date
-add d p returns d + p.
-Raises
  • Out_of_bounds when the resulting date is outside the Julian - period.
  • -
  • Undefined when the resulting date belongs to [October 5th, - 1582; October 14th, 1582].
  • -
-Examples:
  • add (make 2003 12 31) (Period.month 2) returns the date - 2004-3-2 (following the coercion rule describes in the introduction).
    -
  • add (make 2003 12 31) (Period.month 1) returns the date - 2004-1-31
    -
-
val sub : ([< field ] as 'a) date ->
'a date ->
[< field > `Day `Week ] Period.period
-sub d1 d2 returns the period between d1 and d2.
-
-
val precise_sub : ([< field ] as 'a) date ->
'a date -> Period.t
-precise_sub d1 d2 returns the period between d1 and d2. - It is equivalent to sub, but:
    -
  • the period is expressed with a number of years, months and days, not - only with a number of days;
  • -
  • it is less efficient.
  • -
-
-Since 2.03
-
-
val rem : ([< field ] as 'a) date ->
'a Period.period -> 'a date
-rem d p is equivalent to add d (Period.opp p).
-Raises
  • Out_of_bounds when the resulting date is outside the Julian - period.
  • -
  • Undefined when the resulting date belongs to [October 5th, - 1582; October 14th, 1582].
  • -
-
-
val next : ([< field ] as 'a) date -> 'a -> 'a date
-next d f returns the date corresponding to the next specified field.
-Raises
  • Out_of_bounds when the resulting date is outside the Julian - period.
  • -
  • Undefined when the resulting date belongs to [October 5th, - 1582; October 14th, 1582].
  • -
-Example: next (make 2003 12 31) `Month returns the date 2004-1-31 - (i.e. one month later).
-
-
val prev : ([< field ] as 'a) date -> 'a -> 'a date
-prev d f returns the date corresponding to the previous specified - field.
-Raises
  • Out_of_bounds when the resulting date is outside the Julian - period.
  • -
  • Undefined when the resulting date belongs to [October 5th, - 1582; October 14th, 1582].
  • -
-Example: prev (make 2003 12 31) `Year returns the date 2002-12-31 - (i.e. one year ago).
-
-
-

Operations on years


-
val is_leap_year : year -> bool
-Return true if a year is a leap year; false otherwise.
-
-
val same_calendar : year -> year -> bool
-Return true if two years have the same calendar; false - otherwise.
-
-
val days_in_year : ?month:month -> year -> int
-Number of days in a year. -

- - days_in_year ~month y returns the number of days in the year y up - to the end of the given month. Thus days_in_year ~month:Dec y is the - same as days_in_year y.
-

-
val weeks_in_year : year -> int
-Number of weeks in a year.
-
-
val week_first_last : int -> year -> t * t
-Return the first and last days of a week in a year.
-Since 1.08
-
-
val nth_weekday_of_month : year -> month -> day -> int -> t
-nth_weekday_of_month y m d n returns the n-th day d in the month - m of the year y (for instance the 3rd Thursday of the month).
-Since 1.09.0
-
-
val century : year -> int
-Century of a year.
-Examples:
  • century 2001 returns 21.
    -
  • century 2000 returns 20
    -
-
val millenium : year -> int
-Millenium of a year.
-Examples:
  • millenium 2001 returns 3.
    -
  • millenium 2000 returns 2
    -
-
val solar_number : year -> int
-Solar number. -

- - In the Julian calendar there is a one-to-one relationship between the - Solar number and the day on which a particular date falls.
-

-
val indiction : year -> int
-Indiction. -

- - The Indiction was used in the middle ages to specify the position of a - year in a 15 year taxation cycle. It was introduced by emperor - Constantine the Great on 1 September 312 and ceased to be used in - 1806. -

- - The Indiction has no astronomical significance.
-

-
val golden_number : year -> int
-Golden number. -

- - Considering that the relationship between the moon's phases and the - days of the year repeats itself every 19 years, it is natural to - associate a number between 1 and 19 with each year. - This number is the so-called Golden number.
-

-
val epact : year -> int
-Epact. -

- - The Epact is a measure of the age of the moon (i.e. the number of days - that have passed since an "official" new moon) on a particular date.
-

-
val easter : year -> t
-Easter Sunday. -

- - In the Christian world, Easter (and the days immediately preceding it) - is the celebration of the death and resurrection of Jesus in - (approximately) AD 30.
-

-
val carnaval : year -> t
-Carnaval Monday. carnaval y is easter y - 48.
-Since 1.09.0
-
-
val mardi_gras : year -> t
-Mardi Gras. mardi_gras y is easter y - 47.
-Since 1.09.0
-
-
val ash : year -> t
-Ash Wednesday. ash y is easter y - 46.
-Since 1.09.0
-
-
val palm : year -> t
-Palm Sunday. palm y is easter y - 7.
-Since 1.09.0
-
-
val easter_friday : year -> t
-Easter Friday. easter_friday y is easter y - 2.
-Since 1.09.0
-
-
val easter_saturday : year -> t
-Easter Saturday. easter_saturday y is easter y - 1.
-Since 1.09.0
-
-
val easter_monday : year -> t
-Easter Monday. easter_monday y is easter y + 1.
-Since 1.09.0
-
-
val ascension : year -> t
-Ascension. ascension y is easter y + 39.
-Since 1.09.0
-
-
val withsunday : year -> t
-Withsunday. withsunday y is easter y + 49.
-Since 1.09.0
-
-
val withmonday : year -> t
-Withmonday. withmonday y is easter y + 50.
-Since 1.09.0
-
-
val corpus_christi : year -> t
-Feast of Corpus Christi. corpus_christi y is easter + 60.
-Since 1.09.0
-
- \ No newline at end of file diff --git a/doc/Date_sig.html b/doc/Date_sig.html deleted file mode 100644 index 823b483..0000000 --- a/doc/Date_sig.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -Date_sig - - - -

Module Date_sig

-
module Date_sig: sig .. end
-Date interface. A date may be seen as a triple (year, month, day). -

- - All the dates should belong to - [January, 1st 4713 BC; January 22th, 3268 AC] (called the Julian period). - An Out_of_bounds exception is raised if you attempt to create a date - outside the Julian period. -

- - If a date d does not exists and if d_bef (resp. d_aft) is - the last (resp. first) existing date before (resp. after) d, - d is automatically coerced to d_aft + d - d_bef - 1. - For example, both dates "February 29th, 2003" and - "February 30th, 2003" do not exist and they are coerced respectively to the - date "Mars 1st, 2003" and "Mars 2nd, 2003". - This rule is called the coercion rule. - As an exception to the coercion rule, the date belonging to - [October 5th, 1582; October 14th, 1582] do not exist and an Undefined - exception is raised if you attempt to create such a date. - Those dropped days correspond to the change from the Julian to the Gregorian - calendar.
-

-
-
module type S = sig .. end
-Common operations for all date representations. -
- \ No newline at end of file diff --git a/doc/Fcalendar.Precise.html b/doc/Fcalendar.Precise.html deleted file mode 100644 index 4328b2f..0000000 --- a/doc/Fcalendar.Precise.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Fcalendar.Precise - - - -

Module Fcalendar.Precise

-
module Precise: Calendar_sig.S  with module Date = Date and module Time = Ftime
-More precise implementation of calendar in which seconds are float.
-Since 2.0
-
-
-
-

Datatypes


-
module Date: Date_sig.S 
-Date implementation used by this calendar. -
-
module Time: Time_sig.S 
-Time implementation used by this calendar. -
-
type t 
- -
type day = Date.day = 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-| -Sun
-| -Mon
-| -Tue
-| -Wed
-| -Thu
-| -Fri
-| -Sat(*Days of the week.*)
- - -
type month = Date.month = 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-| -Jan
-| -Feb
-| -Mar
-| -Apr
-| -May
-| -Jun
-| -Jul
-| -Aug
-| -Sep
-| -Oct
-| -Nov
-| -Dec(*Months of the year.*)
- - -
type year = Date.year 
-
-Year as an int
-
- -
type second = Time.second 
- -
type field = [ `Day | `Hour | `Minute | `Month | `Second | `Week | `Year ] 
-
-The different fields of a calendar.
-
- -
-

Constructors


-
val make : int -> int -> int -> int -> int -> second -> t
-make year month day hour minute second makes the calendar - "year-month-day; hour-minute-second".
-Raises
  • D.Out_of_bounds when a date is outside the Julian period.
  • -
  • D.Undefined when a date belongs to [October 5th, 1582; October - 14th, 1582].
  • -
-
-
val lmake : year:int ->
?month:int ->
?day:int ->
?hour:int ->
?minute:int -> ?second:second -> unit -> t
-Labelled version of make. - The default value of month and day (resp. of hour, minute - and second) is 1 (resp. 0).
-Since 1.05
-Raises
  • D.Out_of_bounds when a date is outside the Julian period.
  • -
  • D.Undefined when a date belongs to [October 5th, 1582; October - 14th, 1582].
  • -
-
-
val create : Date.t -> Time.t -> t
-create d t creates a calendar from the given date and time.
-
-
val now : unit -> t
-now () returns the current date and time (in the current time - zone).
-
-
val from_jd : float -> t
-Return the Julian day. - More precise than Date.from_jd: the fractional part represents the - time.
-
-
val from_mjd : float -> t
-Return the Modified Julian day. - It is Julian day - 2 400 000.5 (more precise than Date.from_mjd).
-
-
-

Conversions


-
-Those functions have the same behaviour as those defined in - Time_sig.S.
-
val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-See also Time_sig.S.convert
-
-
val to_gmt : t -> t
-See also Time_sig.S.to_gmt
-
-
val from_gmt : t -> t
-See also Time_sig.S.from_gmt
-
-
-

Getters


-
-Those functions have the same behavious as those defined in - Date_sig.S.
-
val days_in_month : t -> int
-
val day_of_week : t -> day
-
val day_of_month : t -> int
-
val day_of_year : t -> int
-
val week : t -> int
-See also Date_sig.S.week
-
-
val month : t -> month
-See also Date_sig.S.month
-
-
val year : t -> int
-See also Date_sig.S.year
-
-
-to_jd and to_mjd are more precise than Date_sig.S.to_jd and - Date_sig.S.to_mjd.
-
val to_jd : t -> float
val to_mjd : t -> float

-Those functions have the same behavious as those defined in - Time_sig.S.
-
val hour : t -> int
-See also Time_sig.S.hour
-
-
val minute : t -> int
-See also Time_sig.S.minute
-
-
val second : t -> second
-See also Time_sig.S.second
-
-
-

Calendars are comparable


-
val equal : t -> t -> bool
-Equality function between two calendars.
-See also Utils.Comparable.equal.
-
-
val compare : t -> t -> int
-Comparison function between two calendars.
-See also Utils.Comparable.compare.
-
-
val hash : t -> int
-Hash function for calendars.
-Since 2.0
-See also Utils.Comparable.hash.
-
-
-Those functions have the same behavious as those defined in - Date_sig.S.
-
val is_leap_day : t -> bool
-
val is_gregorian : t -> bool
-
val is_julian : t -> bool
-
-Those functions have the same behavious as those defined in - Time_sig.S.
-
val is_pm : t -> bool
-See also Time_sig.S.is_pm
-
-
val is_am : t -> bool
-See also Time_sig.S.is_am
-
-
-

Coercions


-
val to_unixtm : t -> Unix.tm
-Convert a calendar into the unix.tm type. - The field isdst is always false. More precise than - Date_sig.S.to_unixtm.
-Since 1.01
-
-
val from_unixtm : Unix.tm -> t
-Inverse of to_unixtm. Assumes the current time zone. - So, The following invariant holds: - hour (from_unixtm u) = u.Unix.tm_hour.
-Since 1.01
-
-
val to_unixfloat : t -> float
-Convert a calendar to a float such than - to_unixfloat (make 1970 1 1 0 0 0) returns 0.0 at UTC. - So such a float is convertible with those of the module Unix. - More precise than Date_sig.S.to_unixfloat.
-Since 1.01
-
-
val from_unixfloat : float -> t
-Inverse of to_unixfloat. Assumes the current time zone. - So, the following invariant holds: - hour (from_unixfloat u) = (Unix.gmtime u).Unix.tm_hour.
-Since 1.01
-
-
val from_date : Date.t -> t
-Convert a date to a calendar. - The time is midnight in the current time zone.
-
-
val to_date : t -> Date.t
-Convert a calendar to a date. Time part of the calendar is ignored.
-
-
val to_time : t -> Time.t
-Convert a calendar to a time. Date part of the calendar is ignored.
-Since 1.03
-
-
-

Period


-
module Period: sig .. end
-A period is the number of seconds between two calendars. -
-
-

Arithmetic operations on calendars and periods


-
-Those functions have the same behavious as those defined in - Date_sig.S.
-
val add : t ->
[< Period.date_field ] Period.period -> t
-See also Date_sig.S.add
-
-
val sub : t ->
t ->
[< Period.date_field > `Day `Week ] Period.period
-See also Date_sig.S.sub
-
-
val precise_sub : t -> t -> Period.t
-Since 2.03
-See also Date_sig.S.precise_sub
-
-
val rem : t ->
[< Period.date_field ] Period.period -> t
-See also Date_sig.S.rem
-
-
val next : t -> field -> t
-See also Date_sig.S.next
-
-
val prev : t -> field -> t
-See also Date_sig.S.prev
-
- \ No newline at end of file diff --git a/doc/Fcalendar.html b/doc/Fcalendar.html deleted file mode 100644 index 147b4f7..0000000 --- a/doc/Fcalendar.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -Fcalendar - - - -

Module Fcalendar

-
module Fcalendar: sig .. end
-Calendar implementation in which seconds are float. -

- - This module uses float. Then results may be very unprecise, especially - comparison of calendars which differ with few seconds. - In this case, consider to use module Precise.
-Since 2.0
-

-
-
include Calendar_sig.S
-
module Precise: Calendar_sig.S  with module Date = Date and module Time = Ftime
-More precise implementation of calendar in which seconds are float. -
- \ No newline at end of file diff --git a/doc/Ftime.html b/doc/Ftime.html deleted file mode 100644 index 1b08ea3..0000000 --- a/doc/Ftime.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -Ftime - - - -

Module Ftime

-
module Ftime: sig .. end
-Time implementation in which seconds are floats. -

- - This module uses float. Then results may be very unprecise.
-Since 2.0
-

-
-
include Time_sig.S
- \ No newline at end of file diff --git a/doc/Period.S.html b/doc/Period.S.html deleted file mode 100644 index fc7f443..0000000 --- a/doc/Period.S.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -Period.S - - - -

Module type Period.S

-
module type S = sig .. end
-Common interface for all periods.
-
-
-
type +[< Period.date_field ] period 
- -
type t = Period.date_field period 
-
-Type of a period.
-
- -
-

Period is an additive monoid


-
val empty : [< Period.date_field ] period
-The empty period.
-
-
val add : ([< Period.date_field ] as 'a) period ->
'a period -> 'a period
-Addition of periods.
-
-
val sub : ([< Period.date_field ] as 'a) period ->
'a period -> 'a period
-Substraction of periods.
-
-
val opp : ([< Period.date_field ] as 'a) period -> 'a period
-Opposite of a period.
-
-
-

Periods are comparable


-
val equal : [< Period.date_field ] period ->
[< Period.date_field ] period -> bool
-Equality function between two periods.
-Since 1.09.0
-See also Utils.Comparable.equal
-
-
val compare : [< Period.date_field ] period ->
[< Period.date_field ] period -> int
-Comparison function between two periods.
-See also Utils.Comparable.compare
-
-
val hash : [< Period.date_field ] period -> int
-Hash function for periods.
-Since 2.0
-See also Utils.Comparable.hash
-
- \ No newline at end of file diff --git a/doc/Period.html b/doc/Period.html deleted file mode 100644 index d38bceb..0000000 --- a/doc/Period.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -Period - - - -

Module Period

-
module Period: sig .. end
-A period represents the time passed between two events (a date, a time...). - Only an interface defining arithmetic operations on periods is defined here. - An implementation of this interface depends on the kind of an event (see - module Time.Period, Date.Period and Calendar.Period).
-
-
-
type date_field = [ `Day | `Month | `Week | `Year ] 
- -
module type S = sig .. end
-Common interface for all periods. -
- \ No newline at end of file diff --git a/doc/Printer.Calendar.html b/doc/Printer.Calendar.html deleted file mode 100644 index 9f36f1c..0000000 --- a/doc/Printer.Calendar.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Printer.Calendar - - - -

Module Printer.Calendar

-
module Calendar: S  with type t = Calendar.t
-Calendar printer. Default format is %i %T.
-Since 2.0
-
-
-
type t 
-
-Generic type of a printer.
-
- -
val fprint : string -> Format.formatter -> t -> unit
-fprint format formatter x outputs x on formatter according to - the specified format.
-Raises Invalid_argument if the format is incorrect.
-
-
val print : string -> t -> unit
-print format is equivalent to fprint format Format.std_formatter
-
-
val dprint : t -> unit
-Same as print d where d is the default format - (see the printer implementations).
-
-
val sprint : string -> t -> string
-sprint format date converts date to a string according to - format.
-
-
val to_string : t -> string
-Same as sprint d where d is the default format - (see the printer implementations).
-
-
-

Parsers from string


-
val from_fstring : string -> string -> t
-from_fstring format s converts s to a date according to format. -

- - Date padding (i.e. a special directive following '%') and - specifiers %e, %k and %l are not recognized. Specifiers - %a, %A, %j, %v, %w and %W are recognized but mainly ignored: - only the validity of the format is checked. -

- - In order to recognize words (used by %a, %A, %b, %B and %p), a - regular expression is used which can be configured by - Printer.set_word_regexp. When the format has only two digits for the - year number, 1900 are added to this number (see examples).
-Raises Invalid_argument if either the format is incorrect or the string - does not match the format or the event cannot be created (e.g. if you do - not specify a year for a date).
-Examples:

  • from_fstring "the date is %B, the %dth %Y" "the date is May, - the 14th 2007" returns a date equivalent to Date.make 2007 5 14 (with - default internationalization).
    -
  • from_fstring "the date is %D" "the date is 01/06/03" - returns a date equivalent to Date.make 1903 1 6
    -
-
val from_string : string -> t
-Same as from_fstring d where d is the default format.
-
- \ No newline at end of file diff --git a/doc/Printer.CalendarPrinter.html b/doc/Printer.CalendarPrinter.html deleted file mode 100644 index 413b3a6..0000000 --- a/doc/Printer.CalendarPrinter.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Printer.CalendarPrinter - - - -

Module Printer.CalendarPrinter

-
module CalendarPrinter: S  with type t = Calendar.t
-Deprecated.Replaced by Printer.Calendar.
-
-
-
type t 
-
-Generic type of a printer.
-
- -
val fprint : string -> Format.formatter -> t -> unit
-fprint format formatter x outputs x on formatter according to - the specified format.
-Raises Invalid_argument if the format is incorrect.
-
-
val print : string -> t -> unit
-print format is equivalent to fprint format Format.std_formatter
-
-
val dprint : t -> unit
-Same as print d where d is the default format - (see the printer implementations).
-
-
val sprint : string -> t -> string
-sprint format date converts date to a string according to - format.
-
-
val to_string : t -> string
-Same as sprint d where d is the default format - (see the printer implementations).
-
-
-

Parsers from string


-
val from_fstring : string -> string -> t
-from_fstring format s converts s to a date according to format. -

- - Date padding (i.e. a special directive following '%') and - specifiers %e, %k and %l are not recognized. Specifiers - %a, %A, %j, %v, %w and %W are recognized but mainly ignored: - only the validity of the format is checked. -

- - In order to recognize words (used by %a, %A, %b, %B and %p), a - regular expression is used which can be configured by - Printer.set_word_regexp. When the format has only two digits for the - year number, 1900 are added to this number (see examples).
-Raises Invalid_argument if either the format is incorrect or the string - does not match the format or the event cannot be created (e.g. if you do - not specify a year for a date).
-Examples:

  • from_fstring "the date is %B, the %dth %Y" "the date is May, - the 14th 2007" returns a date equivalent to Date.make 2007 5 14 (with - default internationalization).
    -
  • from_fstring "the date is %D" "the date is 01/06/03" - returns a date equivalent to Date.make 1903 1 6
    -
-
val from_string : string -> t
-Same as from_fstring d where d is the default format.
-
- \ No newline at end of file diff --git a/doc/Printer.Date.html b/doc/Printer.Date.html deleted file mode 100644 index 4145980..0000000 --- a/doc/Printer.Date.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -Printer.Date - - - -

Module Printer.Date

-
module Date: S  with type t = Date.t
-Date printer. Specifiers which use time functionalities are not available - on this printer. - Default format is %i.
-Since 2.0
-
-
-
type t 
-
-Generic type of a printer.
-
- -
val fprint : string -> Format.formatter -> t -> unit
-fprint format formatter x outputs x on formatter according to - the specified format.
-Raises Invalid_argument if the format is incorrect.
-
-
val print : string -> t -> unit
-print format is equivalent to fprint format Format.std_formatter
-
-
val dprint : t -> unit
-Same as print d where d is the default format - (see the printer implementations).
-
-
val sprint : string -> t -> string
-sprint format date converts date to a string according to - format.
-
-
val to_string : t -> string
-Same as sprint d where d is the default format - (see the printer implementations).
-
-
-

Parsers from string


-
val from_fstring : string -> string -> t
-from_fstring format s converts s to a date according to format. -

- - Date padding (i.e. a special directive following '%') and - specifiers %e, %k and %l are not recognized. Specifiers - %a, %A, %j, %v, %w and %W are recognized but mainly ignored: - only the validity of the format is checked. -

- - In order to recognize words (used by %a, %A, %b, %B and %p), a - regular expression is used which can be configured by - Printer.set_word_regexp. When the format has only two digits for the - year number, 1900 are added to this number (see examples).
-Raises Invalid_argument if either the format is incorrect or the string - does not match the format or the event cannot be created (e.g. if you do - not specify a year for a date).
-Examples:

  • from_fstring "the date is %B, the %dth %Y" "the date is May, - the 14th 2007" returns a date equivalent to Date.make 2007 5 14 (with - default internationalization).
    -
  • from_fstring "the date is %D" "the date is 01/06/03" - returns a date equivalent to Date.make 1903 1 6
    -
-
val from_string : string -> t
-Same as from_fstring d where d is the default format.
-
- \ No newline at end of file diff --git a/doc/Printer.DatePrinter.html b/doc/Printer.DatePrinter.html deleted file mode 100644 index 3cbaa1e..0000000 --- a/doc/Printer.DatePrinter.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Printer.DatePrinter - - - -

Module Printer.DatePrinter

-
module DatePrinter: S  with type t = Date.t
-Deprecated.Replaced by Printer.Date.
-
-
-
type t 
-
-Generic type of a printer.
-
- -
val fprint : string -> Format.formatter -> t -> unit
-fprint format formatter x outputs x on formatter according to - the specified format.
-Raises Invalid_argument if the format is incorrect.
-
-
val print : string -> t -> unit
-print format is equivalent to fprint format Format.std_formatter
-
-
val dprint : t -> unit
-Same as print d where d is the default format - (see the printer implementations).
-
-
val sprint : string -> t -> string
-sprint format date converts date to a string according to - format.
-
-
val to_string : t -> string
-Same as sprint d where d is the default format - (see the printer implementations).
-
-
-

Parsers from string


-
val from_fstring : string -> string -> t
-from_fstring format s converts s to a date according to format. -

- - Date padding (i.e. a special directive following '%') and - specifiers %e, %k and %l are not recognized. Specifiers - %a, %A, %j, %v, %w and %W are recognized but mainly ignored: - only the validity of the format is checked. -

- - In order to recognize words (used by %a, %A, %b, %B and %p), a - regular expression is used which can be configured by - Printer.set_word_regexp. When the format has only two digits for the - year number, 1900 are added to this number (see examples).
-Raises Invalid_argument if either the format is incorrect or the string - does not match the format or the event cannot be created (e.g. if you do - not specify a year for a date).
-Examples:

  • from_fstring "the date is %B, the %dth %Y" "the date is May, - the 14th 2007" returns a date equivalent to Date.make 2007 5 14 (with - default internationalization).
    -
  • from_fstring "the date is %D" "the date is 01/06/03" - returns a date equivalent to Date.make 1903 1 6
    -
-
val from_string : string -> t
-Same as from_fstring d where d is the default format.
-
- \ No newline at end of file diff --git a/doc/Printer.Fcalendar.html b/doc/Printer.Fcalendar.html deleted file mode 100644 index 1965161..0000000 --- a/doc/Printer.Fcalendar.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -Printer.Fcalendar - - - -

Module Printer.Fcalendar

-
module Fcalendar: S  with type t = Fcalendar.t
-Fcalendar printer. Seconds are rounded to integers before pretty printing. - Default format is %i %T.
-Since 2.0
-
-
-
type t 
-
-Generic type of a printer.
-
- -
val fprint : string -> Format.formatter -> t -> unit
-fprint format formatter x outputs x on formatter according to - the specified format.
-Raises Invalid_argument if the format is incorrect.
-
-
val print : string -> t -> unit
-print format is equivalent to fprint format Format.std_formatter
-
-
val dprint : t -> unit
-Same as print d where d is the default format - (see the printer implementations).
-
-
val sprint : string -> t -> string
-sprint format date converts date to a string according to - format.
-
-
val to_string : t -> string
-Same as sprint d where d is the default format - (see the printer implementations).
-
-
-

Parsers from string


-
val from_fstring : string -> string -> t
-from_fstring format s converts s to a date according to format. -

- - Date padding (i.e. a special directive following '%') and - specifiers %e, %k and %l are not recognized. Specifiers - %a, %A, %j, %v, %w and %W are recognized but mainly ignored: - only the validity of the format is checked. -

- - In order to recognize words (used by %a, %A, %b, %B and %p), a - regular expression is used which can be configured by - Printer.set_word_regexp. When the format has only two digits for the - year number, 1900 are added to this number (see examples).
-Raises Invalid_argument if either the format is incorrect or the string - does not match the format or the event cannot be created (e.g. if you do - not specify a year for a date).
-Examples:

  • from_fstring "the date is %B, the %dth %Y" "the date is May, - the 14th 2007" returns a date equivalent to Date.make 2007 5 14 (with - default internationalization).
    -
  • from_fstring "the date is %D" "the date is 01/06/03" - returns a date equivalent to Date.make 1903 1 6
    -
-
val from_string : string -> t
-Same as from_fstring d where d is the default format.
-
- \ No newline at end of file diff --git a/doc/Printer.Ftime.html b/doc/Printer.Ftime.html deleted file mode 100644 index 0398198..0000000 --- a/doc/Printer.Ftime.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Printer.Ftime - - - -

Module Printer.Ftime

-
module Ftime: S  with type t = Ftime.t
-Ftime printer. Seconds are rounded to integers before pretty printing. - Specifiers which use date functionalities are not available - on this printer. - Default format is %T.
-Since 2.0
-
-
-
type t 
-
-Generic type of a printer.
-
- -
val fprint : string -> Format.formatter -> t -> unit
-fprint format formatter x outputs x on formatter according to - the specified format.
-Raises Invalid_argument if the format is incorrect.
-
-
val print : string -> t -> unit
-print format is equivalent to fprint format Format.std_formatter
-
-
val dprint : t -> unit
-Same as print d where d is the default format - (see the printer implementations).
-
-
val sprint : string -> t -> string
-sprint format date converts date to a string according to - format.
-
-
val to_string : t -> string
-Same as sprint d where d is the default format - (see the printer implementations).
-
-
-

Parsers from string


-
val from_fstring : string -> string -> t
-from_fstring format s converts s to a date according to format. -

- - Date padding (i.e. a special directive following '%') and - specifiers %e, %k and %l are not recognized. Specifiers - %a, %A, %j, %v, %w and %W are recognized but mainly ignored: - only the validity of the format is checked. -

- - In order to recognize words (used by %a, %A, %b, %B and %p), a - regular expression is used which can be configured by - Printer.set_word_regexp. When the format has only two digits for the - year number, 1900 are added to this number (see examples).
-Raises Invalid_argument if either the format is incorrect or the string - does not match the format or the event cannot be created (e.g. if you do - not specify a year for a date).
-Examples:

  • from_fstring "the date is %B, the %dth %Y" "the date is May, - the 14th 2007" returns a date equivalent to Date.make 2007 5 14 (with - default internationalization).
    -
  • from_fstring "the date is %D" "the date is 01/06/03" - returns a date equivalent to Date.make 1903 1 6
    -
-
val from_string : string -> t
-Same as from_fstring d where d is the default format.
-
- \ No newline at end of file diff --git a/doc/Printer.Precise_Calendar.html b/doc/Printer.Precise_Calendar.html deleted file mode 100644 index f3fd1b8..0000000 --- a/doc/Printer.Precise_Calendar.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Printer.Precise_Calendar - - - -

Module Printer.Precise_Calendar

-
module Precise_Calendar: S  with type t = Calendar.Precise.t
-Precise Calendar printer. Default format is %i %T.
-Since 2.0
-
-
-
type t 
-
-Generic type of a printer.
-
- -
val fprint : string -> Format.formatter -> t -> unit
-fprint format formatter x outputs x on formatter according to - the specified format.
-Raises Invalid_argument if the format is incorrect.
-
-
val print : string -> t -> unit
-print format is equivalent to fprint format Format.std_formatter
-
-
val dprint : t -> unit
-Same as print d where d is the default format - (see the printer implementations).
-
-
val sprint : string -> t -> string
-sprint format date converts date to a string according to - format.
-
-
val to_string : t -> string
-Same as sprint d where d is the default format - (see the printer implementations).
-
-
-

Parsers from string


-
val from_fstring : string -> string -> t
-from_fstring format s converts s to a date according to format. -

- - Date padding (i.e. a special directive following '%') and - specifiers %e, %k and %l are not recognized. Specifiers - %a, %A, %j, %v, %w and %W are recognized but mainly ignored: - only the validity of the format is checked. -

- - In order to recognize words (used by %a, %A, %b, %B and %p), a - regular expression is used which can be configured by - Printer.set_word_regexp. When the format has only two digits for the - year number, 1900 are added to this number (see examples).
-Raises Invalid_argument if either the format is incorrect or the string - does not match the format or the event cannot be created (e.g. if you do - not specify a year for a date).
-Examples:

  • from_fstring "the date is %B, the %dth %Y" "the date is May, - the 14th 2007" returns a date equivalent to Date.make 2007 5 14 (with - default internationalization).
    -
  • from_fstring "the date is %D" "the date is 01/06/03" - returns a date equivalent to Date.make 1903 1 6
    -
-
val from_string : string -> t
-Same as from_fstring d where d is the default format.
-
- \ No newline at end of file diff --git a/doc/Printer.Precise_Fcalendar.html b/doc/Printer.Precise_Fcalendar.html deleted file mode 100644 index 6895efe..0000000 --- a/doc/Printer.Precise_Fcalendar.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Printer.Precise_Fcalendar - - - -

Module Printer.Precise_Fcalendar

-
module Precise_Fcalendar: S  with type t = Fcalendar.Precise.t
-Precise Fcalendar printer. - Seconds are rounded to integers before pretty printing. - Default format is %i %T.
-Since 2.0
-
-
-
type t 
-
-Generic type of a printer.
-
- -
val fprint : string -> Format.formatter -> t -> unit
-fprint format formatter x outputs x on formatter according to - the specified format.
-Raises Invalid_argument if the format is incorrect.
-
-
val print : string -> t -> unit
-print format is equivalent to fprint format Format.std_formatter
-
-
val dprint : t -> unit
-Same as print d where d is the default format - (see the printer implementations).
-
-
val sprint : string -> t -> string
-sprint format date converts date to a string according to - format.
-
-
val to_string : t -> string
-Same as sprint d where d is the default format - (see the printer implementations).
-
-
-

Parsers from string


-
val from_fstring : string -> string -> t
-from_fstring format s converts s to a date according to format. -

- - Date padding (i.e. a special directive following '%') and - specifiers %e, %k and %l are not recognized. Specifiers - %a, %A, %j, %v, %w and %W are recognized but mainly ignored: - only the validity of the format is checked. -

- - In order to recognize words (used by %a, %A, %b, %B and %p), a - regular expression is used which can be configured by - Printer.set_word_regexp. When the format has only two digits for the - year number, 1900 are added to this number (see examples).
-Raises Invalid_argument if either the format is incorrect or the string - does not match the format or the event cannot be created (e.g. if you do - not specify a year for a date).
-Examples:

  • from_fstring "the date is %B, the %dth %Y" "the date is May, - the 14th 2007" returns a date equivalent to Date.make 2007 5 14 (with - default internationalization).
    -
  • from_fstring "the date is %D" "the date is 01/06/03" - returns a date equivalent to Date.make 1903 1 6
    -
-
val from_string : string -> t
-Same as from_fstring d where d is the default format.
-
- \ No newline at end of file diff --git a/doc/Printer.S.html b/doc/Printer.S.html deleted file mode 100644 index 9add055..0000000 --- a/doc/Printer.S.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - -Printer.S - - - -

Module type Printer.S

-
module type S = sig .. end
-Generic signature of a printer-parser.
-
-
-
type t 
-
-Generic type of a printer.
-
- -
val fprint : string -> Format.formatter -> t -> unit
-fprint format formatter x outputs x on formatter according to - the specified format.
-Raises Invalid_argument if the format is incorrect.
-
-
val print : string -> t -> unit
-print format is equivalent to fprint format Format.std_formatter
-
-
val dprint : t -> unit
-Same as print d where d is the default format - (see the printer implementations).
-
-
val sprint : string -> t -> string
-sprint format date converts date to a string according to - format.
-
-
val to_string : t -> string
-Same as sprint d where d is the default format - (see the printer implementations).
-
-
-

Parsers from string


-
val from_fstring : string -> string -> t
-from_fstring format s converts s to a date according to format. -

- - Date padding (i.e. a special directive following '%') and - specifiers %e, %k and %l are not recognized. Specifiers - %a, %A, %j, %v, %w and %W are recognized but mainly ignored: - only the validity of the format is checked. -

- - In order to recognize words (used by %a, %A, %b, %B and %p), a - regular expression is used which can be configured by - Printer.set_word_regexp. When the format has only two digits for the - year number, 1900 are added to this number (see examples).
-Raises Invalid_argument if either the format is incorrect or the string - does not match the format or the event cannot be created (e.g. if you do - not specify a year for a date).
-Examples:

  • from_fstring "the date is %B, the %dth %Y" "the date is May, - the 14th 2007" returns a date equivalent to Date.make 2007 5 14 (with - default internationalization).
    -
  • from_fstring "the date is %D" "the date is 01/06/03" - returns a date equivalent to Date.make 1903 1 6
    -
-
val from_string : string -> t
-Same as from_fstring d where d is the default format.
-
- \ No newline at end of file diff --git a/doc/Printer.Time.html b/doc/Printer.Time.html deleted file mode 100644 index 2170b09..0000000 --- a/doc/Printer.Time.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Printer.Time - - - -

Module Printer.Time

-
module Time: S  with type t = Time.t
-Time printer. Specifiers which use date functionalities are not available - on this printer. - Default format is %T.
-Since 2.0
-
-
-
type t 
-
-Generic type of a printer.
-
- -
val fprint : string -> Format.formatter -> t -> unit
-fprint format formatter x outputs x on formatter according to - the specified format.
-Raises Invalid_argument if the format is incorrect.
-
-
val print : string -> t -> unit
-print format is equivalent to fprint format Format.std_formatter
-
-
val dprint : t -> unit
-Same as print d where d is the default format - (see the printer implementations).
-
-
val sprint : string -> t -> string
-sprint format date converts date to a string according to - format.
-
-
val to_string : t -> string
-Same as sprint d where d is the default format - (see the printer implementations).
-
-
-

Parsers from string


-
val from_fstring : string -> string -> t
-from_fstring format s converts s to a date according to format. -

- - Date padding (i.e. a special directive following '%') and - specifiers %e, %k and %l are not recognized. Specifiers - %a, %A, %j, %v, %w and %W are recognized but mainly ignored: - only the validity of the format is checked. -

- - In order to recognize words (used by %a, %A, %b, %B and %p), a - regular expression is used which can be configured by - Printer.set_word_regexp. When the format has only two digits for the - year number, 1900 are added to this number (see examples).
-Raises Invalid_argument if either the format is incorrect or the string - does not match the format or the event cannot be created (e.g. if you do - not specify a year for a date).
-Examples:

  • from_fstring "the date is %B, the %dth %Y" "the date is May, - the 14th 2007" returns a date equivalent to Date.make 2007 5 14 (with - default internationalization).
    -
  • from_fstring "the date is %D" "the date is 01/06/03" - returns a date equivalent to Date.make 1903 1 6
    -
-
val from_string : string -> t
-Same as from_fstring d where d is the default format.
-
- \ No newline at end of file diff --git a/doc/Printer.TimePrinter.html b/doc/Printer.TimePrinter.html deleted file mode 100644 index 185eec2..0000000 --- a/doc/Printer.TimePrinter.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Printer.TimePrinter - - - -

Module Printer.TimePrinter

-
module TimePrinter: S  with type t = Time.t
-Deprecated.Replaced by Printer.Time.
-
-
-
type t 
-
-Generic type of a printer.
-
- -
val fprint : string -> Format.formatter -> t -> unit
-fprint format formatter x outputs x on formatter according to - the specified format.
-Raises Invalid_argument if the format is incorrect.
-
-
val print : string -> t -> unit
-print format is equivalent to fprint format Format.std_formatter
-
-
val dprint : t -> unit
-Same as print d where d is the default format - (see the printer implementations).
-
-
val sprint : string -> t -> string
-sprint format date converts date to a string according to - format.
-
-
val to_string : t -> string
-Same as sprint d where d is the default format - (see the printer implementations).
-
-
-

Parsers from string


-
val from_fstring : string -> string -> t
-from_fstring format s converts s to a date according to format. -

- - Date padding (i.e. a special directive following '%') and - specifiers %e, %k and %l are not recognized. Specifiers - %a, %A, %j, %v, %w and %W are recognized but mainly ignored: - only the validity of the format is checked. -

- - In order to recognize words (used by %a, %A, %b, %B and %p), a - regular expression is used which can be configured by - Printer.set_word_regexp. When the format has only two digits for the - year number, 1900 are added to this number (see examples).
-Raises Invalid_argument if either the format is incorrect or the string - does not match the format or the event cannot be created (e.g. if you do - not specify a year for a date).
-Examples:

  • from_fstring "the date is %B, the %dth %Y" "the date is May, - the 14th 2007" returns a date equivalent to Date.make 2007 5 14 (with - default internationalization).
    -
  • from_fstring "the date is %D" "the date is 01/06/03" - returns a date equivalent to Date.make 1903 1 6
    -
-
val from_string : string -> t
-Same as from_fstring d where d is the default format.
-
- \ No newline at end of file diff --git a/doc/Printer.html b/doc/Printer.html deleted file mode 100644 index 0e8da9e..0000000 --- a/doc/Printer.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Printer - - - -

Module Printer

-
module Printer: sig .. end
-Pretty printing and parsing from string. - In the following, an "event" is either a date or a time or a calendar. -

- - This module implements different printers: one for each kind of events. - The three printers have the same signature: - they mainly implement a fprint : string -> formatter -> t -> unit function - and a from_fstring : string -> string -> t function. - The first one prints an event according to a format string - (see below for a description of such a format). - The second one converts a string to an event according to a format string. -

- - A format string follows the unix utility 'date' (with few modifications). - It is a string which contains two types of objects: plain characters and - conversion specifiers. Those specifiers are introduced by - a % character and their meanings are:

    -
  • %%: a literal %
  • -
  • %a: short day name (by using a short version of day_name)
  • -
  • %A: day name (by using day_name)
  • -
  • %b: short month name (by using a short version of month_name)
  • -
  • %B: month name (by using month_name)
  • -
  • %c: shortcut for %a %b %d %H:%M:%S %Y
  • -
  • %C: century: as %Y without the two last digits (since version 2.01)
  • -
  • %d: day of month (01..31)
  • -
  • %D: shortcut for %m/%d/%y
  • -
  • %e: same as %_d
  • -
  • %F: shortcut for %Y-%m-%d: ISO-8601 notation (since version 2.01)
  • -
  • %h: same as %b
  • -
  • %H: hour (00..23)
  • -
  • %I: hour (01..12)
  • -
  • %i: same as %F; deprecated since 2.01
  • -
  • %j: day of year (001..366)
  • -
  • %k: same as %_H
  • -
  • %l: same as %_I
  • -
  • %m: month (01..12)
  • -
  • %M: minute (00..59)
  • -
  • %n: a newline (same as \n)
  • -
  • %p: AM or PM
  • -
  • %P: am or pm (same as %p in lowercase) (since version 2.01)
  • -
  • %r: shortcut for %I:%M:%S %p
  • -
  • %R: shortcut for %H:%M (since version 2.01)
  • -
  • %s: number of seconds since 1970/1/1 (since version 2.01)
  • -
  • %S: second (00..60)
  • -
  • %t: a horizontal tab (same as \t)
  • -
  • %T: shortcut for %H:%M:%S
  • -
  • %V: week number of year (01..53)
  • -
  • %w: day of week (1..7)
  • -
  • %W: same as %V
  • -
  • %y: last two digits of year (00..99)
  • -
  • %Y: year (four digits)
  • -
  • %z: time zone in the form +hhmm (e.g. -0400) (since version 2.01)
  • -
  • %:z: time zone in the form +hh:mm (e.g. -04:00) (since version 2.01)
  • -
  • %::z: time zone in the form +hh:mm:ss (e.g. -04:00:00) - (since version 2.01)
  • -
  • %:::z: time zone in the form +hh (e.g. -04) (since version 2.01)
  • -
- - By default, date pads numeric fields with zeroes. Two special modifiers - between `%' and a numeric directive are recognized:
    -
  • '-' (hyphen): do not pad the field
  • -
  • '_' (underscore): pad the field with spaces
  • -
  • '0' (zero): pad the field with zeroes (default) (since version 2.01)
  • -
  • '^': use uppercase if possible (since version 2.01) - Padding is only available for printers, not for parsers.
  • -
-
-Since 1.05
-Examples:
  • a possible output of %c is Thu Sep 18 14:10:51 2003.
    -
  • a possible output of the date is %B, the %-dth is - the date is January, the 6th is matched by ;
    -
  • a possible output of %D is 01/06/03
    -
-
-
-

Internationalization

-

- - You can manage the string representations of days and months. - By default, the English names are used but you can change their by - setting the references day_name and month_name.
-

val day_name : (Date.day -> string) Pervasives.ref
-String representation of a day.
-
-
val name_of_day : Date.day -> string
-name_of_day d is equivalent to !day_name d. - Used by the specifier %A.
-
-
val short_name_of_day : Date.day -> string
-short_name_of_day d returns the 3 first characters of name_of_day d. - Used by the specifier %a.
-
-
val month_name : (Date.month -> string) Pervasives.ref
-String representation of a month.
-
-
val name_of_month : Date.month -> string
-name_of_month m is equivalent to !day_month m. - Used by the specifier %B.
-
-
val short_name_of_month : Date.month -> string
-short_name_of_month d returns the 3 first characters of - name_of_month d. - Used by the specifier %b.
-
-
val set_word_regexp : Str.regexp -> unit
-Set the regular expression used to recognize words in - from_fstring. Default is [a-zA-Z]*.
-Since 1.10
-
-
-

Printers (including parsers from string)

-

- - Printers also contain parsers which allow to build events from strings.
-

module type S = sig .. end
-Generic signature of a printer-parser. -
-
module Date: S  with type t = Date.t
-Date printer. -
-
module DatePrinter: S  with type t = Date.t
-
-
module Time: S  with type t = Time.t
-Time printer. -
-
module TimePrinter: S  with type t = Time.t
-
-
module Ftime: S  with type t = Ftime.t
-Ftime printer. -
-
module Precise_Calendar: S  with type t = Calendar.Precise.t
-Precise Calendar printer. -
-
module Calendar: S  with type t = Calendar.t
-Calendar printer. -
-
module CalendarPrinter: S  with type t = Calendar.t
-
-
module Precise_Fcalendar: S  with type t = Fcalendar.Precise.t
-Precise Fcalendar printer. -
-
module Fcalendar: S  with type t = Fcalendar.t
-Fcalendar printer. -
- \ No newline at end of file diff --git a/doc/Time.html b/doc/Time.html deleted file mode 100644 index 80e9bd5..0000000 --- a/doc/Time.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -Time - - - -

Module Time

-
module Time: sig .. end
-Time implementation in which seconds are integers.
-
-
-
include Time_sig.S
- \ No newline at end of file diff --git a/doc/Time_Zone.html b/doc/Time_Zone.html deleted file mode 100644 index 3ec55ca..0000000 --- a/doc/Time_Zone.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -Time_Zone - - - -

Module Time_Zone

-
module Time_Zone: sig .. end
-Time zone management. -

- - You can change the current time zone in your program by side effect.
-

-
-
type t = 
- - - - - - - - - - - - - - -
-| -UTC(*Greenwich Meridian Time*)
-| -Local(*Local Time*)
-| -UTC_Plus of int(*Another time zone specified from UTC*)
- -
-Type of a time zone.
-
- -
val current : unit -> t
-Return the current time zone. It is UTC before any change.
-
-
val change : t -> unit
-Change the current time zone by another one. - Raise Invalid_argument if the specified time zone is UTC_Plus x with - x < -12 or x > 11
-
-
val gap : t -> t -> int
-Return the gap between two time zone.
-Example: gap UTC (UTC_Plus 5) returns 5 and, at Paris in summer, - gap Local UTC returns -2.
-
-
val from_gmt : unit -> int
-from_gmt () is equivalent to gap UTC (current ()).
-
-
val to_gmt : unit -> int
-to_gmt () is equivalent to gap (current ()) UTC.
-
-
val is_dst : unit -> bool
-is_dst () checks if daylight saving time is in effect. - Only relevant in local time. - Returns alway false in another time zone.
-Since 1.09.4
-
-
val hour_of_dst : unit -> int
-hour_of_dst () returns 1 if is_dst () and 0 otherwise.
-Since 1.09.4
-
-
val on : ('a -> 'b) -> t -> 'a -> 'b
-on f tz x changes the time zone to tz, then computes f x, and - finally reset the time zone to the initial one and returns the result of - the computation.
-Since 2.0
-
- \ No newline at end of file diff --git a/doc/Time_sig.S.Period.html b/doc/Time_sig.S.Period.html deleted file mode 100644 index 0082805..0000000 --- a/doc/Time_sig.S.Period.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Time_sig.S.Period - - - -

Module Time_sig.S.Period

-
module Period: sig .. end
-A period is the number of seconds between two times.
-
-
-
-

Arithmetic operations


-
include Period.S
-
val length : [< Period.date_field ] period -> Time_sig.S.second
-Number of seconds of a period.
-
-
val mul : ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-Multiplication.
-
-
val div : ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-Division.
-
-
-

Constructors


-
val make : int -> int -> Time_sig.S.second -> [< Period.date_field ] period
-make hour minute second makes a period of the specified length.
-
-
val lmake : ?hour:int ->
?minute:int ->
?second:Time_sig.S.second -> unit -> [< Period.date_field ] period
-Labelled version of make. - The default value is 0 for each argument.
-
-
val hour : int -> [< Period.date_field ] period
-hour n makes a period of n hours.
-
-
val minute : int -> [< Period.date_field ] period
-minute n makes a period of n minutes.
-
-
val second : Time_sig.S.second -> [< Period.date_field ] period
-second n makes a period of n seconds.
-
-
-

Getters


-
val to_seconds : [< Period.date_field ] period -> Time_sig.S.second
-Number of seconds of a period.
-Since 1.04
-Example: to_seconds (make 1 2 3) returns 3600 + 120 + 3 = 3723.
-
-
val to_minutes : [< Period.date_field ] period -> float
-Number of minutes of a period. The resulting fractional part - represents seconds.
-Since 1.04
-Example: to_minutes (make 1 2 3) returns 60 + 2 + 0.05 = 62.05.
-
-
val to_hours : [< Period.date_field ] period -> float
-Number of hours of a period. The resulting fractional part represents - minutes and seconds.
-Since 1.04
-Example: to_hours (make 1 3 0) returns 1 + 0.05 = 1.05.
-
- \ No newline at end of file diff --git a/doc/Time_sig.S.Second.html b/doc/Time_sig.S.Second.html deleted file mode 100644 index a234cdf..0000000 --- a/doc/Time_sig.S.Second.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - -Time_sig.S.Second - - - -

Module Time_sig.S.Second

-
module Second: Time_sig.Second  with type t = second
-Second implementation
-Since 2.0
-
-
-
type t 
-
-Type of seconds.
-
- -
val from_int : int -> t
-Convert an integer to an equivalent number of seconds.
-
-
val from_float : float -> t
-Convert a float to an equivalent number of seconds.
-
-
val to_int : t -> int
-Inverse of from_int.
-
-
val to_float : t -> float
-Inverse of from_float.
-
- \ No newline at end of file diff --git a/doc/Time_sig.S.html b/doc/Time_sig.S.html deleted file mode 100644 index 095d034..0000000 --- a/doc/Time_sig.S.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Time_sig.S - - - -

Module type Time_sig.S

-
module type S = sig .. end
-Common operations for all time representations.
-Since 2.0 (this signature was before inlined in interface of Time).
-
-
-
-

Datatypes


-
type t 
-
-Type of a time.
-
- -
type field = [ `Hour | `Minute | `Second ] 
-
-The different fields of a time.
-
- -
-

Second


-
type second 
-
-Type of a second.
-Since 2.0 (was an integer in previous versions).
-
- -
module Second: Time_sig.Second  with type t = second
-Second implementation -
-
-

Constructors


-
val make : int -> int -> second -> t
-make hour minute second makes the time hour-minute-second.
-
-
val lmake : ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-Labelled version of make. The default value is 0 for each argument.
-Since 1.05
-
-
val now : unit -> t
-The current time based on Time_Zone.current ().
-
-
val midnight : unit -> t
-midnight () is midnight (expressed in the current time zone). - So, it has always the same behaviour as make 0 0 0.
-
-
val midday : unit -> t
-midday () is midday (expressed in the current time zone). - So, it has always the same behaviour as make 12 0 0.
-
-
-

Conversions


-
val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-convert t t1 t2 converts the time t expressed in the time zone t1 - to the same time expressed in the time zone t2.
-Example: convert (make 20 0 0) (Time_Zone.GMT_Plus 2) - (Time_Zone.GMT_Plus 4) returns the time 22-0-0.
-
-
val from_gmt : t -> t
-from_gmt t is equivalent to - convert t Time_Zone.GMT (Time_Zone.current ()).
-
-
val to_gmt : t -> t
-to_gmt t is equivalent to - convert t (Time_Zone.current ()) Time_Zone.GMT.
-
-
val normalize : t -> t * int
-normalize t returns t such that hour t belongs to [0; 24[. The - second component of the result is the number of days needed by the - modification.
-Example: normalize (make 22 0 0) returns the time 22-0-0 and 0, - normalize (make 73 0 0) returns the time 1-0-0 and 3 and normalize - (make (-73) 0 0) returns the time 23-0-0 and (-4).
-
-
-

Getters


-
val hour : t -> int
-Hour.
-Example: hour (make 20 0 0) returns 20.
-
-
val minute : t -> int
-Minute.
-Example: minute (make 20 10 0) returns 10.
-
-
val second : t -> second
-Second.
-Example: second (make 20 10 5) returns 5.
-
-
val to_seconds : t -> second
-Number of seconds of a time.
-Example: to_seconds (make 1 2 3) returns 3600 + 120 + 3 = 3723.
-
-
val to_minutes : t -> float
-Number of minutes of a time. The resulting fractional part represents - seconds.
-Example: to_minutes (make 1 2 3) returns 60+2+0.05 = 62.05.
-
-
val to_hours : t -> float
-Number of hours of a time. The resulting fractional part represents - minutes and seconds.
-Example: to_hours (make 1 3 0) returns 1 + 0.05 = 1.05.
-
-
-

Times are comparable


-
val equal : t -> t -> bool
-Equality function between two times.
-Since 1.09.0
-See also Utils.Comparable.equal.
-
-
val compare : t -> t -> int
-Comparison function between two times.
-See also Utils.Comparable.compare.
-
-
val hash : t -> int
-Hash function for times.
-Since 2.0
-See also Utils.Comparable.hash.
-
-
-

Boolean operations on times


-
val is_pm : t -> bool
-Return true is the time is before midday in the current time zone; - false otherwise.
-Example: both is_pm (make 10 0 0) and is_pm (make 34 0 0) return - true.
-
-
val is_am : t -> bool
-Return true is the time is after midday in the current time zone; - false otherwise.
-Example: both is_am (make 20 0 0) and is_am (make 44 0 0) return - true.
-
-
-

Coercions


-
val from_seconds : second -> t
-Inverse of to_seconds.
-
-
val from_minutes : float -> t
-Inverse of to_minutes.
-
-
val from_hours : float -> t
-Inverse of to_hours.
-
-
-

Period


-
module Period: sig .. end
-A period is the number of seconds between two times. -
-
-

Arithmetic operations on times and periods


-
val add : t ->
[< Period.date_field ] Period.period -> t
-app t p returns t + p.
-Example: add (make 20 0 0) (Period.minute 70) returns the time - 21:10:0.
-
-
val sub : t ->
t -> [< Period.date_field ] Period.period
-sub t1 t2 returns the period between t1 and t2.
-
-
val rem : t ->
[< Period.date_field ] Period.period -> t
-rem t p is equivalent to add t (Period.opp p).
-
-
val next : t -> field -> t
-next t f returns the time corresponding to the next specified field.
-Example: next (make 20 3 31) `Minute returns the time 20:04:31. - (i.e. one minute later).
-
-
val prev : t -> field -> t
-prev t f returns the time corresponding to the previous specified - field.
-Example: prev (make 20 3 31) `Second returns the time 20:03:30 - (i.e. one second ago).
-
- \ No newline at end of file diff --git a/doc/Time_sig.Second.html b/doc/Time_sig.Second.html deleted file mode 100644 index 74803ac..0000000 --- a/doc/Time_sig.Second.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - -Time_sig.Second - - - -

Module type Time_sig.Second

-
module type Second = sig .. end
-Interface for seconds.
-Since 2.0
-
-
-
type t 
-
-Type of seconds.
-
- -
val from_int : int -> t
-Convert an integer to an equivalent number of seconds.
-
-
val from_float : float -> t
-Convert a float to an equivalent number of seconds.
-
-
val to_int : t -> int
-Inverse of from_int.
-
-
val to_float : t -> float
-Inverse of from_float.
-
- \ No newline at end of file diff --git a/doc/Time_sig.html b/doc/Time_sig.html deleted file mode 100644 index 8dcabdd..0000000 --- a/doc/Time_sig.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -Time_sig - - - -

Module Time_sig

-
module Time_sig: sig .. end
-Time interface. A time may be seen as a triple (hour, minute, second). -

- - If minutes and seconds do not belong to [0; 60[, they are coerced into - this interval.
-Example: "30 hours, 60 minutes, 80 seconds" is coerced to "31 hours, 1 - minute, 20 seconds". -

- - Each time is interpreted in the current time zone (given by - Time_Zone.current ()). So, if you change the time zone (by - Time_Zone.change), each time consequently changes. - If you want to express a time in another time zone (and do not affect - others times), use the convert function.
-

-
-
module type Second = sig .. end
-Interface for seconds. -
-
module type S = sig .. end
-Common operations for all time representations. -
- \ No newline at end of file diff --git a/doc/Utils.Comparable.html b/doc/Utils.Comparable.html deleted file mode 100644 index b1c9fba..0000000 --- a/doc/Utils.Comparable.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - -Utils.Comparable - - - -

Module type Utils.Comparable

-
module type Comparable = sig .. end
-Interface for comparable and hashable types. - Modules implementing this interface can be an argument of Map.Make, - Set.Make or Hashtbl.Make.
-Since 2.0
-
-
-
type t 
- -
val equal : t -> t -> bool
-Equality over t.
-
-
val compare : t -> t -> int
-Comparison over t. - compare x y returns 0 iff equal x y = 0. If x and y are not - equal, it returns a negative integer iff x is lesser than y and a - positive integer otherwise.
-
-
val hash : t -> int
-A hash function over t.
-
- \ No newline at end of file diff --git a/doc/Utils.Float.html b/doc/Utils.Float.html deleted file mode 100644 index 9b3b5f8..0000000 --- a/doc/Utils.Float.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - -Utils.Float - - - -

Module Utils.Float

-
module Float: sig .. end
-Float implementation.
-Since 2.0
-
-
-
include Utils.Comparable
-
val set_precision : float -> unit
-Set the precision of equal and compare for float. - If the precision is p, then the floats x and y are equal iff - abs(x-y) < p. By default, the precision is 1e-3 (that is one - millisecond if floats represents seconds).
-
-
val round : t -> int
-Round a float to the nearest integer.
-
- \ No newline at end of file diff --git a/doc/Utils.Int.html b/doc/Utils.Int.html deleted file mode 100644 index 30bff74..0000000 --- a/doc/Utils.Int.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - -Utils.Int - - - -

Module Utils.Int

-
module Int: Comparable  with type t = int
-Integer implementation.
-Since 2.0
-
-
-
type t 
- -
val equal : t -> t -> bool
-Equality over t.
-
-
val compare : t -> t -> int
-Comparison over t. - compare x y returns 0 iff equal x y = 0. If x and y are not - equal, it returns a negative integer iff x is lesser than y and a - positive integer otherwise.
-
-
val hash : t -> int
-A hash function over t.
-
- \ No newline at end of file diff --git a/doc/Utils.html b/doc/Utils.html deleted file mode 100644 index d9d6e0e..0000000 --- a/doc/Utils.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - -Utils - - - -

Module Utils

-
module Utils: sig .. end
-Some utilities.
-Since 2.0
-
-
-
module type Comparable = sig .. end
-Interface for comparable and hashable types. -
-
module Int: Comparable  with type t = int
-Integer implementation. -
-
module Float: sig .. end
-Float implementation. -
- \ No newline at end of file diff --git a/doc/Version.html b/doc/Version.html deleted file mode 100644 index 23a92b3..0000000 --- a/doc/Version.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - -Version - - - -

Module Version

-
module Version: sig .. end
-Information about version of calendar.
-Since 2.0
-
-
-
val version : string
-Name of this version.
-
-
val date : string
-Date of compilation.
-
- \ No newline at end of file diff --git a/doc/index.html b/doc/index.html deleted file mode 100644 index 4e3bf43..0000000 --- a/doc/index.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- -

- - - - - - - - - - - - - - - -
Utils
-Some utilities. -
-
Time_Zone
-Time zone management. -
-
Period
-A period represents the time passed between two events (a date, a time...). -
-
Time_sig
-Time interface. -
-
Time
-Time implementation in which seconds are integers. -
-
Ftime
-Time implementation in which seconds are floats. -
-
Date_sig
-Date interface. -
-
Date
-Date implementation. -
-
Calendar_sig
-Calendar interface. -
-
Calendar_builder
-Generic calendar implementation. -
-
Calendar
-Calendar implementation in which seconds are integer. -
-
Fcalendar
-Calendar implementation in which seconds are float. -
-
Printer
-Pretty printing and parsing from string. -
-
Version
-Information about version of calendar. -
-
- - \ No newline at end of file diff --git a/doc/index_attributes.html b/doc/index_attributes.html deleted file mode 100644 index cdd77e2..0000000 --- a/doc/index_attributes.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -Index of class attributes - - - -

Index of class attributes

- -
- - \ No newline at end of file diff --git a/doc/index_class_types.html b/doc/index_class_types.html deleted file mode 100644 index 08686ba..0000000 --- a/doc/index_class_types.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -Index of class types - - - -

Index of class types

- -
- - \ No newline at end of file diff --git a/doc/index_classes.html b/doc/index_classes.html deleted file mode 100644 index de18ee6..0000000 --- a/doc/index_classes.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -Index of classes - - - -

Index of classes

- -
- - \ No newline at end of file diff --git a/doc/index_exceptions.html b/doc/index_exceptions.html deleted file mode 100644 index 2195cc9..0000000 --- a/doc/index_exceptions.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -Index of exceptions - - - -

Index of exceptions

- - - - - - - - - - - - -

N
Not_computable [Calendar_sig.S.Period]
-= Date.Period.Not_computable. -
-
Not_computable [Date_sig.S.Period]
-
-

O
Out_of_bounds [Date_sig.S]
-Raised when a date is outside the Julian period. -
-

U
Undefined [Date_sig.S]
-Raised when a date belongs to - [October 5th, 1582; October 14th, 1582]. -
-
- - \ No newline at end of file diff --git a/doc/index_methods.html b/doc/index_methods.html deleted file mode 100644 index 09708ab..0000000 --- a/doc/index_methods.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -Index of class methods - - - -

Index of class methods

- -
- - \ No newline at end of file diff --git a/doc/index_module_types.html b/doc/index_module_types.html deleted file mode 100644 index 747f77e..0000000 --- a/doc/index_module_types.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -Index of module types - - - -

Index of module types

- - - - - - - - - - - - - - - - - -

C
Comparable [Utils]
-Interface for comparable and hashable types. -
-

S
S [Printer]
-Generic signature of a printer-parser. -
-
S [Calendar_sig]
-Common operations for all calendar representations. -
-
S [Date_sig]
-Common operations for all date representations. -
-
S [Time_sig]
-Common operations for all time representations. -
-
S [Period]
-Common interface for all periods. -
-
Second [Time_sig]
-Interface for seconds. -
-
- - \ No newline at end of file diff --git a/doc/index_modules.html b/doc/index_modules.html deleted file mode 100644 index 34910fa..0000000 --- a/doc/index_modules.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -Index of modules - - - -

Index of modules

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

C
Calendar [Printer]
-Calendar printer. -
-
Calendar
-Calendar implementation in which seconds are integer. -
-
CalendarPrinter [Printer]
-
-
Calendar_builder
-Generic calendar implementation. -
-
Calendar_sig
-Calendar interface. -
-

D
Date [Printer]
-Date printer. -
-
Date [Calendar_sig.S]
-Date implementation used by this calendar. -
-
Date
-Date implementation. -
-
DatePrinter [Printer]
-
-
Date_sig
-Date interface. -
-

F
Fcalendar [Printer]
-Fcalendar printer. -
-
Fcalendar
-Calendar implementation in which seconds are float. -
-
Float [Utils]
-Float implementation. -
-
Ftime [Printer]
-Ftime printer. -
-
Ftime
-Time implementation in which seconds are floats. -
-

I
Int [Utils]
-Integer implementation. -
-

M
Make [Calendar_builder]
-Implement a calendar from a date implementation and a time implementation. -
-
Make_Precise [Calendar_builder]
-Similar to Calendar_builder.Make but results are more precise. -
-

P
Period [Calendar_sig.S]
-A period is the number of seconds between two calendars. -
-
Period [Date_sig.S]
-A period is the number of days between two dates. -
-
Period [Time_sig.S]
-A period is the number of seconds between two times. -
-
Period
-A period represents the time passed between two events (a date, a time...). -
-
Precise [Fcalendar]
-More precise implementation of calendar in which seconds are float. -
-
Precise [Calendar]
-More precise implementation of calendar in which seconds are integer. -
-
Precise_Calendar [Printer]
-Precise Calendar printer. -
-
Precise_Fcalendar [Printer]
-Precise Fcalendar printer. -
-
Printer
-Pretty printing and parsing from string. -
-

S
Second [Time_sig.S]
-Second implementation -
-

T
Time [Printer]
-Time printer. -
-
Time [Calendar_sig.S]
-Time implementation used by this calendar. -
-
Time
-Time implementation in which seconds are integers. -
-
TimePrinter [Printer]
-
-
Time_Zone
-Time zone management. -
-
Time_sig
-Time interface. -
-

U
Utils
-Some utilities. -
-

V
Version
-Information about version of calendar. -
-
- - \ No newline at end of file diff --git a/doc/index_types.html b/doc/index_types.html deleted file mode 100644 index 3ef03f6..0000000 --- a/doc/index_types.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -Index of types - - - -

Index of types

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

D
date [Date_sig.S]
-Type of a date, without specifying any precision level. -
-
date_field [Period]
day [Calendar_sig.S]
day [Date_sig.S]
-Days of the week. -
-

F
field [Calendar_sig.S]
-The different fields of a calendar. -
-
field [Date_sig.S]
-The different fields of a date. -
-
field [Time_sig.S]
-The different fields of a time. -
-

M
month [Calendar_sig.S]
month [Date_sig.S]
-Months of the year. -
-

P
p [Date_sig.S.Period]
period [Calendar_sig.S.Period]
period [Period.S]

S
second [Calendar_sig.S]
second [Time_sig.S]
-Type of a second. -
-

T
t [Printer.S]
-Generic type of a printer. -
-
t [Calendar_sig.S.Period]
-Type of a period. -
-
t [Calendar_sig.S]
t [Date_sig.S]
-Type of a date. -
-
t [Time_sig.S]
-Type of a time. -
-
t [Time_sig.Second]
-Type of seconds. -
-
t [Period.S]
-Type of a period. -
-
t [Time_Zone]
-Type of a time zone. -
-
t [Utils.Comparable]

Y
year [Calendar_sig.S]
-Year as an int -
-
year [Date_sig.S]
-Year as an int. -
-
- - \ No newline at end of file diff --git a/doc/index_values.html b/doc/index_values.html deleted file mode 100644 index 54d0488..0000000 --- a/doc/index_values.html +++ /dev/null @@ -1,1122 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -Index of values - - - -

Index of values

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

A
add [Calendar_sig.S.Period]
-Addition of periods. -
-
add [Calendar_sig.S]
-
-
add [Date_sig.S]
-add d p returns d + p. -
-
add [Time_sig.S]
-app t p returns t + p. -
-
add [Period.S]
-Addition of periods. -
-
ascension [Date_sig.S]
-Ascension. -
-
ash [Date_sig.S]
-Ash Wednesday. -
-

C
carnaval [Date_sig.S]
-Carnaval Monday. -
-
century [Date_sig.S]
-Century of a year. -
-
change [Time_Zone]
-Change the current time zone by another one. -
-
compare [Calendar_sig.S.Period]
-Comparison function between two periods. -
-
compare [Calendar_sig.S]
-Comparison function between two calendars. -
-
compare [Date_sig.S]
-Comparison function between two dates. -
-
compare [Time_sig.S]
-Comparison function between two times. -
-
compare [Period.S]
-Comparison function between two periods. -
-
compare [Utils.Comparable]
-Comparison over t. -
-
convert [Calendar_sig.S]
-
-
convert [Time_sig.S]
-convert t t1 t2 converts the time t expressed in the time zone t1 - to the same time expressed in the time zone t2. -
-
corpus_christi [Date_sig.S]
-Feast of Corpus Christi. -
-
create [Calendar_sig.S]
-create d t creates a calendar from the given date and time. -
-
current [Time_Zone]
-Return the current time zone. -
-

D
date [Version]
-Date of compilation. -
-
day [Calendar_sig.S.Period]
-
-
day [Date_sig.S.Period]
-day n makes a period of n days. -
-
day_name [Printer]
-String representation of a day. -
-
day_of_int [Date_sig.S]
-Inverse of int_of_day. -
-
day_of_month [Calendar_sig.S]
-
-
day_of_month [Date_sig.S]
-Day of the month. -
-
day_of_week [Calendar_sig.S]
-
-
day_of_week [Date_sig.S]
-Day of the week. -
-
day_of_year [Calendar_sig.S]
-
-
day_of_year [Date_sig.S]
-Day of the year. -
-
days_in_month [Calendar_sig.S]
-
-
days_in_month [Date_sig.S]
-Number of days in the month of a date. -
-
days_in_year [Date_sig.S]
-Number of days in a year. -
-
div [Time_sig.S.Period]
-Division. -
-
dprint [Printer.S]
-Same as print d where d is the default format - (see the printer implementations). -
-

E
easter [Date_sig.S]
-Easter Sunday. -
-
easter_friday [Date_sig.S]
-Easter Friday. -
-
easter_monday [Date_sig.S]
-Easter Monday. -
-
easter_saturday [Date_sig.S]
-Easter Saturday. -
-
empty [Calendar_sig.S.Period]
-The empty period. -
-
empty [Period.S]
-The empty period. -
-
epact [Date_sig.S]
-Epact. -
-
equal [Calendar_sig.S.Period]
-Equality function between two periods. -
-
equal [Calendar_sig.S]
-Equality function between two calendars. -
-
equal [Date_sig.S]
-Equality function between two dates. -
-
equal [Time_sig.S]
-Equality function between two times. -
-
equal [Period.S]
-Equality function between two periods. -
-
equal [Utils.Comparable]
-Equality over t. -
-

F
fprint [Printer.S]
-fprint format formatter x outputs x on formatter according to - the specified format. -
-
from_business [Date_sig.S]
-Inverse of to_business respecting ISO-8601. -
-
from_date [Calendar_sig.S.Period]
-Convert a date period to a calendar period. -
-
from_date [Calendar_sig.S]
-Convert a date to a calendar. -
-
from_day_of_year [Date_sig.S]
-Make a date from a year and its day of the year. -
-
from_float [Time_sig.Second]
-Convert a float to an equivalent number of seconds. -
-
from_fstring [Printer.S]
-from_fstring format s converts s to a date according to format. -
-
from_gmt [Calendar_sig.S]
-
-
from_gmt [Time_sig.S]
-from_gmt t is equivalent to - convert t Time_Zone.GMT (Time_Zone.current ()). -
-
from_gmt [Time_Zone]
-from_gmt () is equivalent to gap UTC (current ()). -
-
from_hours [Time_sig.S]
-Inverse of to_hours. -
-
from_int [Time_sig.Second]
-Convert an integer to an equivalent number of seconds. -
-
from_jd [Calendar_sig.S]
-Return the Julian day. -
-
from_jd [Date_sig.S]
-Make a date from its Julian day. -
-
from_minutes [Time_sig.S]
-Inverse of to_minutes. -
-
from_mjd [Calendar_sig.S]
-Return the Modified Julian day. -
-
from_mjd [Date_sig.S]
-Make a date from its modified Julian day (i.e. -
-
from_seconds [Time_sig.S]
-Inverse of to_seconds. -
-
from_string [Printer.S]
-Same as from_fstring d where d is the default format. -
-
from_time [Calendar_sig.S.Period]
-Convert a time period to a calendar period. -
-
from_unixfloat [Calendar_sig.S]
-Inverse of to_unixfloat. -
-
from_unixfloat [Date_sig.S]
-Inverse of to_unixfloat. -
-
from_unixtm [Calendar_sig.S]
-Inverse of to_unixtm. -
-
from_unixtm [Date_sig.S]
-Inverse of to_unixtm. -
-

G
gap [Time_Zone]
-Return the gap between two time zone. -
-
golden_number [Date_sig.S]
-Golden number. -
-

H
hash [Calendar_sig.S.Period]
-Hash function for periods. -
-
hash [Calendar_sig.S]
-Hash function for calendars. -
-
hash [Date_sig.S]
-Hash function for dates. -
-
hash [Time_sig.S]
-Hash function for times. -
-
hash [Period.S]
-Hash function for periods. -
-
hash [Utils.Comparable]
-A hash function over t. -
-
hour [Calendar_sig.S.Period]
-
-
hour [Calendar_sig.S]
-
-
hour [Time_sig.S.Period]
-hour n makes a period of n hours. -
-
hour [Time_sig.S]
-Hour. -
-
hour_of_dst [Time_Zone]
-hour_of_dst () returns 1 if is_dst () and 0 otherwise. -
-

I
indiction [Date_sig.S]
-Indiction. -
-
int_of_day [Date_sig.S]
-Convert a day to an integer respecting ISO-8601. -
-
int_of_month [Date_sig.S]
-Convert a month to an integer respecting ISO-8601. -
-
is_am [Calendar_sig.S]
-
-
is_am [Time_sig.S]
-Return true is the time is after midday in the current time zone; - false otherwise. -
-
is_dst [Time_Zone]
-is_dst () checks if daylight saving time is in effect. -
-
is_gregorian [Calendar_sig.S]
-
-
is_gregorian [Date_sig.S]
-Return true if a date belongs to the Gregorian calendar; - false otherwise. -
-
is_julian [Calendar_sig.S]
-
-
is_julian [Date_sig.S]
-Return true iff a date belongs to the Julian calendar; - false otherwise. -
-
is_leap_day [Calendar_sig.S]
-
-
is_leap_day [Date_sig.S]
-Return true if a date is a leap day - (i.e. -
-
is_leap_year [Date_sig.S]
-Return true if a year is a leap year; false otherwise. -
-
is_pm [Calendar_sig.S]
-
-
is_pm [Time_sig.S]
-Return true is the time is before midday in the current time zone; - false otherwise. -
-
is_valid_date [Date_sig.S]
-Check if a date is valid, that is the date has not been coerced to look - like a real date. -
-

L
length [Time_sig.S.Period]
-Number of seconds of a period. -
-
lmake [Calendar_sig.S.Period]
-Labelled version of make. -
-
lmake [Calendar_sig.S]
-Labelled version of make. -
-
lmake [Date_sig.S.Period]
-Labelled version of make. -
-
lmake [Date_sig.S]
-Labelled version of make. -
-
lmake [Time_sig.S.Period]
-Labelled version of make. -
-
lmake [Time_sig.S]
-Labelled version of make. -
-

M
make [Calendar_sig.S.Period]
-make year month day hour minute second makes a period of the - specified length. -
-
make [Calendar_sig.S]
-make year month day hour minute second makes the calendar - "year-month-day; hour-minute-second". -
-
make [Date_sig.S.Period]
-make year month day makes a period of the specified length. -
-
make [Date_sig.S]
-make year month day makes the date year-month-day. -
-
make [Time_sig.S.Period]
-make hour minute second makes a period of the specified length. -
-
make [Time_sig.S]
-make hour minute second makes the time hour-minute-second. -
-
make_year [Date_sig.S]
-make_year y makes a date only represented by its year y. -
-
make_year_month [Date_sig.S]
-make_year_month y m makes a date only represented by its year y and - its month m. -
-
mardi_gras [Date_sig.S]
-Mardi Gras. -
-
midday [Time_sig.S]
-midday () is midday (expressed in the current time zone). -
-
midnight [Time_sig.S]
-midnight () is midnight (expressed in the current time zone). -
-
millenium [Date_sig.S]
-Millenium of a year. -
-
minute [Calendar_sig.S.Period]
-
-
minute [Calendar_sig.S]
-
-
minute [Time_sig.S.Period]
-minute n makes a period of n minutes. -
-
minute [Time_sig.S]
-Minute. -
-
month [Calendar_sig.S.Period]
-
-
month [Calendar_sig.S]
-
-
month [Date_sig.S.Period]
-month n makes a period of n months. -
-
month [Date_sig.S]
-Month. -
-
month_name [Printer]
-String representation of a month. -
-
month_of_int [Date_sig.S]
-Inverse of int_of_month. -
-
mul [Time_sig.S.Period]
-Multiplication. -
-

N
name_of_day [Printer]
-name_of_day d is equivalent to !day_name d. -
-
name_of_month [Printer]
-name_of_month m is equivalent to !day_month m. -
-
nb_days [Date_sig.S.Period]
-Number of days in a period. -
-
next [Calendar_sig.S]
-
-
next [Date_sig.S]
-next d f returns the date corresponding to the next specified field. -
-
next [Time_sig.S]
-next t f returns the time corresponding to the next specified field. -
-
normalize [Time_sig.S]
-normalize t returns t such that hour t belongs to [0; 24[. -
-
now [Calendar_sig.S]
-now () returns the current date and time (in the current time - zone). -
-
now [Time_sig.S]
-The current time based on Time_Zone.current (). -
-
nth_weekday_of_month [Date_sig.S]
-nth_weekday_of_month y m d n returns the n-th day d in the month - m of the year y (for instance the 3rd Thursday of the month). -
-

O
on [Time_Zone]
-on f tz x changes the time zone to tz, then computes f x, and - finally reset the time zone to the initial one and returns the result of - the computation. -
-
opp [Calendar_sig.S.Period]
-Opposite of a period. -
-
opp [Period.S]
-Opposite of a period. -
-

P
palm [Date_sig.S]
-Palm Sunday. -
-
precise_sub [Calendar_sig.S]
-
-
precise_sub [Date_sig.S]
-precise_sub d1 d2 returns the period between d1 and d2. -
-
prev [Calendar_sig.S]
-
-
prev [Date_sig.S]
-prev d f returns the date corresponding to the previous specified - field. -
-
prev [Time_sig.S]
-prev t f returns the time corresponding to the previous specified - field. -
-
print [Printer.S]
-print format is equivalent to fprint format Format.std_formatter -
-

R
rem [Calendar_sig.S]
-
-
rem [Date_sig.S]
-rem d p is equivalent to add d (Period.opp p). -
-
rem [Time_sig.S]
-rem t p is equivalent to add t (Period.opp p). -
-
round [Utils.Float]
-Round a float to the nearest integer. -
-

S
safe_nb_days [Date_sig.S.Period]
-Equivalent to Date_sig.S.Period.nb_days but never raises any exception. -
-
safe_to_time [Calendar_sig.S.Period]
-Equivalent to Calendar_sig.S.Period.to_time but never raises any exception. -
-
same_calendar [Date_sig.S]
-Return true if two years have the same calendar; false - otherwise. -
-
second [Calendar_sig.S.Period]
-
-
second [Calendar_sig.S]
-
-
second [Time_sig.S.Period]
-second n makes a period of n seconds. -
-
second [Time_sig.S]
-Second. -
-
set_precision [Utils.Float]
-Set the precision of equal and compare for float. -
-
set_word_regexp [Printer]
-Set the regular expression used to recognize words in - from_fstring. -
-
short_name_of_day [Printer]
-short_name_of_day d returns the 3 first characters of name_of_day d. -
-
short_name_of_month [Printer]
-short_name_of_month d returns the 3 first characters of - name_of_month d. -
-
solar_number [Date_sig.S]
-Solar number. -
-
sprint [Printer.S]
-sprint format date converts date to a string according to - format. -
-
sub [Calendar_sig.S.Period]
-Substraction of periods. -
-
sub [Calendar_sig.S]
-
-
sub [Date_sig.S]
-sub d1 d2 returns the period between d1 and d2. -
-
sub [Time_sig.S]
-sub t1 t2 returns the period between t1 and t2. -
-
sub [Period.S]
-Substraction of periods. -
-

T
to_business [Date_sig.S]
-Return the "business week" and the day in this week respecting ISO 8601. -
-
to_date [Calendar_sig.S.Period]
-Convert a calendar period to a date period. -
-
to_date [Calendar_sig.S]
-Convert a calendar to a date. -
-
to_float [Time_sig.Second]
-Inverse of from_float. -
-
to_gmt [Calendar_sig.S]
-
-
to_gmt [Time_sig.S]
-to_gmt t is equivalent to - convert t (Time_Zone.current ()) Time_Zone.GMT. -
-
to_gmt [Time_Zone]
-to_gmt () is equivalent to gap (current ()) UTC. -
-
to_hours [Time_sig.S.Period]
-Number of hours of a period. -
-
to_hours [Time_sig.S]
-Number of hours of a time. -
-
to_int [Time_sig.Second]
-Inverse of from_int. -
-
to_jd [Calendar_sig.S]
to_jd [Date_sig.S]
-Julian day. -
-
to_minutes [Time_sig.S.Period]
-Number of minutes of a period. -
-
to_minutes [Time_sig.S]
-Number of minutes of a time. -
-
to_mjd [Calendar_sig.S]
to_mjd [Date_sig.S]
-Modified Julian day (i.e. -
-
to_seconds [Time_sig.S.Period]
-Number of seconds of a period. -
-
to_seconds [Time_sig.S]
-Number of seconds of a time. -
-
to_string [Printer.S]
-Same as sprint d where d is the default format - (see the printer implementations). -
-
to_time [Calendar_sig.S.Period]
-Convert a calendar period to a date period. -
-
to_time [Calendar_sig.S]
-Convert a calendar to a time. -
-
to_unixfloat [Calendar_sig.S]
-Convert a calendar to a float such than - to_unixfloat (make 1970 1 1 0 0 0) returns 0.0 at UTC. -
-
to_unixfloat [Date_sig.S]
-Convert a date to a float such than to_unixfloat (make 1970 1 1) - returns 0.0. -
-
to_unixtm [Calendar_sig.S]
-Convert a calendar into the unix.tm type. -
-
to_unixtm [Date_sig.S]
-Convert a date into the Unix.tm type. -
-
today [Date_sig.S]
-Date of the current day (based on Time_Zone.current ()). -
-

V
version [Version]
-Name of this version. -
-

W
week [Calendar_sig.S.Period]
-
-
week [Calendar_sig.S]
-
-
week [Date_sig.S.Period]
-week n makes a period of n weeks. -
-
week [Date_sig.S]
-Week. -
-
week_first_last [Date_sig.S]
-Return the first and last days of a week in a year. -
-
weeks_in_year [Date_sig.S]
-Number of weeks in a year. -
-
withmonday [Date_sig.S]
-Withmonday. -
-
withsunday [Date_sig.S]
-Withsunday. -
-

Y
year [Calendar_sig.S.Period]
-
-
year [Calendar_sig.S]
-
-
year [Date_sig.S.Period]
-year n makes a period of n years. -
-
year [Date_sig.S]
-Year. -
-
ymd [Date_sig.S.Period]
-Number of years, months and days in a period. -
-
ymds [Calendar_sig.S.Period]
-Number of years, months, days and seconds in a period. -
-
- - \ No newline at end of file diff --git a/doc/style.css b/doc/style.css deleted file mode 100644 index 993fd5c..0000000 --- a/doc/style.css +++ /dev/null @@ -1,41 +0,0 @@ -.keyword { font-weight : bold ; color : Red } -.keywordsign { color : #C04600 } -.superscript { font-size : 4 } -.subscript { font-size : 4 } -.comment { color : Green } -.constructor { color : Blue } -.type { color : #5C6585 } -.string { color : Maroon } -.warning { color : Red ; font-weight : bold } -.info { margin-left : 3em; margin-right: 3em } -.param_info { margin-top: 4px; margin-left : 3em; margin-right : 3em } -.code { color : #465F91 ; } -.typetable { border-style : hidden } -.paramstable { border-style : hidden ; padding: 5pt 5pt} -tr { background-color : White } -td.typefieldcomment { background-color : #FFFFFF ; font-size: smaller ;} -div.sig_block {margin-left: 2em} -*:target { background: yellow; } -body {font: 13px sans-serif; color: black; text-align: left; padding: 5px; margin: 0} -h1 { font-size : 20pt ; text-align: center; } -h2 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90BDFF ;padding: 2px; } -h3 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90DDFF ;padding: 2px; } -h4 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90EDFF ;padding: 2px; } -h5 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90FDFF ;padding: 2px; } -h6 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #90BDFF ; padding: 2px; } -div.h7 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #E0FFFF ; padding: 2px; } -div.h8 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #F0FFFF ; padding: 2px; } -div.h9 { font-size : 20pt ; border: 1px solid #000000; margin-top: 5px; margin-bottom: 2px;text-align: center; background-color: #FFFFFF ; padding: 2px; } -a {color: #416DFF; text-decoration: none} -a:hover {background-color: #ddd; text-decoration: underline} -pre { margin-bottom: 4px; font-family: monospace; } -pre.verbatim, pre.codepre { } -.indextable {border: 1px #ddd solid; border-collapse: collapse} -.indextable td, .indextable th {border: 1px #ddd solid; min-width: 80px} -.indextable td.module {background-color: #eee ; padding-left: 2px; padding-right: 2px} -.indextable td.module a {color: 4E6272; text-decoration: none; display: block; width: 100%} -.indextable td.module a:hover {text-decoration: underline; background-color: transparent} -.deprecated {color: #888; font-style: italic} -.indextable tr td div.info { margin-left: 2px; margin-right: 2px } -ul.indexlist { margin-left: 0; padding-left: 0;} -ul.indexlist li { list-style-type: none ; margin-left: 0; padding-left: 0; } \ No newline at end of file diff --git a/doc/type_Calendar.Precise.html b/doc/type_Calendar.Precise.html deleted file mode 100644 index 3d53536..0000000 --- a/doc/type_Calendar.Precise.html +++ /dev/null @@ -1,330 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Calendar.Precise - - -sig
-  module Date :
-    sig
-      type field = Period.date_field
-      type -'a date = 'Date.date constraint 'a = [< field ]
-      type t = field date
-      type day = Date.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-      type month =
-        Date.month =
-          Jan
-        | Feb
-        | Mar
-        | Apr
-        | May
-        | Jun
-        | Jul
-        | Aug
-        | Sep
-        | Oct
-        | Nov
-        | Dec
-      type year = int
-      exception Out_of_bounds
-      exception Undefined
-      val make : year -> int -> int -> t
-      val lmake : year:year -> ?month:int -> ?day:int -> unit -> t
-      val make_year : int -> [< `Year ] date
-      val make_year_month : int -> int -> [< `Month | `Year ] date
-      val today : unit -> t
-      val from_jd : int -> t
-      val from_mjd : int -> t
-      val from_day_of_year : year -> int -> t
-      val days_in_month : [< field > `Month `Year ] date -> int
-      val day_of_week : t -> day
-      val day_of_month : t -> int
-      val day_of_year : t -> int
-      val week : t -> int
-      val month : [< field > `Month ] date -> month
-      val year : [< field > `Year ] date -> year
-      val to_jd : t -> int
-      val to_mjd : t -> int
-      val equal : [< field ] date -> [< field ] date -> bool
-      val compare : [< field ] date -> [< field ] date -> int
-      val hash : [< field ] date -> int
-      val is_valid_date : year -> int -> int -> bool
-      val is_leap_day : t -> bool
-      val is_gregorian : t -> bool
-      val is_julian : t -> bool
-      val to_unixtm : t -> Unix.tm
-      val from_unixtm : Unix.tm -> t
-      val to_unixfloat : t -> float
-      val from_unixfloat : float -> t
-      val to_business : t -> year * int * day
-      val from_business : year -> int -> day -> t
-      val int_of_day : day -> int
-      val day_of_int : int -> day
-      val int_of_month : month -> int
-      val month_of_int : int -> month
-      module Period :
-        sig
-          type +'a p = 'Date.Period.p constraint 'a = [< field ]
-          type +'a period = 'a p constraint 'a = [< field ]
-          type t = Period.date_field period
-          val empty : [< Period.date_field ] period
-          val add :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val sub :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val opp : ([< Period.date_field ] as 'a) period -> 'a period
-          val equal :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> bool
-          val compare :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> int
-          val hash : [< Period.date_field ] period -> int
-          val make : int -> int -> int -> t
-          val lmake : ?year:int -> ?month:int -> ?day:int -> unit -> t
-          val year : int -> [< field > `Year ] period
-          val month : int -> [< field > `Month `Year ] period
-          val week : int -> [< field > `Day `Week ] period
-          val day : int -> [< field > `Day `Week ] period
-          exception Not_computable
-          val nb_days : [< field ] period -> int
-          val safe_nb_days : [< `Day | `Week ] period -> int
-          val ymd : [< field ] period -> int * int * int
-        end
-      val add : ([< field ] as 'a) date -> 'Period.period -> 'a date
-      val sub :
-        ([< field ] as 'a) date ->
-        'a date -> [< field > `Day `Week ] Period.period
-      val precise_sub : ([< field ] as 'a) date -> 'a date -> Period.t
-      val rem : ([< field ] as 'a) date -> 'Period.period -> 'a date
-      val next : ([< field ] as 'a) date -> '-> 'a date
-      val prev : ([< field ] as 'a) date -> '-> 'a date
-      val is_leap_year : year -> bool
-      val same_calendar : year -> year -> bool
-      val days_in_year : ?month:month -> year -> int
-      val weeks_in_year : year -> int
-      val week_first_last : int -> year -> t * t
-      val nth_weekday_of_month : year -> month -> day -> int -> t
-      val century : year -> int
-      val millenium : year -> int
-      val solar_number : year -> int
-      val indiction : year -> int
-      val golden_number : year -> int
-      val epact : year -> int
-      val easter : year -> t
-      val carnaval : year -> t
-      val mardi_gras : year -> t
-      val ash : year -> t
-      val palm : year -> t
-      val easter_friday : year -> t
-      val easter_saturday : year -> t
-      val easter_monday : year -> t
-      val ascension : year -> t
-      val withsunday : year -> t
-      val withmonday : year -> t
-      val corpus_christi : year -> t
-    end
-  module Time :
-    sig
-      type t = Time.t
-      type field = [ `Hour | `Minute | `Second ]
-      type second = int
-      module Second :
-        sig
-          type t = second
-          val from_int : int -> t
-          val from_float : float -> t
-          val to_int : t -> int
-          val to_float : t -> float
-        end
-      val make : int -> int -> second -> t
-      val lmake : ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-      val now : unit -> t
-      val midnight : unit -> t
-      val midday : unit -> t
-      val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-      val from_gmt : t -> t
-      val to_gmt : t -> t
-      val normalize : t -> t * int
-      val hour : t -> int
-      val minute : t -> int
-      val second : t -> second
-      val to_seconds : t -> second
-      val to_minutes : t -> float
-      val to_hours : t -> float
-      val equal : t -> t -> bool
-      val compare : t -> t -> int
-      val hash : t -> int
-      val is_pm : t -> bool
-      val is_am : t -> bool
-      val from_seconds : second -> t
-      val from_minutes : float -> t
-      val from_hours : float -> t
-      module Period :
-        sig
-          type +'a period = 'Time.Period.period
-            constraint 'a = [< Period.date_field ]
-          type t = Period.date_field period
-          val empty : [< Period.date_field ] period
-          val add :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val sub :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val opp : ([< Period.date_field ] as 'a) period -> 'a period
-          val equal :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> bool
-          val compare :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> int
-          val hash : [< Period.date_field ] period -> int
-          val length : [< Period.date_field ] period -> second
-          val mul :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val div :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val make : int -> int -> second -> [< Period.date_field ] period
-          val lmake :
-            ?hour:int ->
-            ?minute:int ->
-            ?second:second -> unit -> [< Period.date_field ] period
-          val hour : int -> [< Period.date_field ] period
-          val minute : int -> [< Period.date_field ] period
-          val second : second -> [< Period.date_field ] period
-          val to_seconds : [< Period.date_field ] period -> second
-          val to_minutes : [< Period.date_field ] period -> float
-          val to_hours : [< Period.date_field ] period -> float
-        end
-      val add : t -> [< Period.date_field ] Period.period -> t
-      val sub : t -> t -> [< Period.date_field ] Period.period
-      val rem : t -> [< Period.date_field ] Period.period -> t
-      val next : t -> field -> t
-      val prev : t -> field -> t
-    end
-  type t
-  type day = Date.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-  type month =
-    Date.month =
-      Jan
-    | Feb
-    | Mar
-    | Apr
-    | May
-    | Jun
-    | Jul
-    | Aug
-    | Sep
-    | Oct
-    | Nov
-    | Dec
-  type year = Date.year
-  type second = Time.second
-  type field = [ `Day | `Hour | `Minute | `Month | `Second | `Week | `Year ]
-  val make : int -> int -> int -> int -> int -> second -> t
-  val lmake :
-    year:int ->
-    ?month:int ->
-    ?day:int -> ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-  val create : Date.t -> Time.t -> t
-  val now : unit -> t
-  val from_jd : float -> t
-  val from_mjd : float -> t
-  val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-  val to_gmt : t -> t
-  val from_gmt : t -> t
-  val days_in_month : t -> int
-  val day_of_week : t -> day
-  val day_of_month : t -> int
-  val day_of_year : t -> int
-  val week : t -> int
-  val month : t -> month
-  val year : t -> int
-  val to_jd : t -> float
-  val to_mjd : t -> float
-  val hour : t -> int
-  val minute : t -> int
-  val second : t -> second
-  val equal : t -> t -> bool
-  val compare : t -> t -> int
-  val hash : t -> int
-  val is_leap_day : t -> bool
-  val is_gregorian : t -> bool
-  val is_julian : t -> bool
-  val is_pm : t -> bool
-  val is_am : t -> bool
-  val to_unixtm : t -> Unix.tm
-  val from_unixtm : Unix.tm -> t
-  val to_unixfloat : t -> float
-  val from_unixfloat : float -> t
-  val from_date : Date.t -> t
-  val to_date : t -> Date.t
-  val to_time : t -> Time.t
-  module Period :
-    sig
-      type +'a period constraint 'a = [< Period.date_field ]
-      type t = Period.date_field period
-      val empty : [< Period.date_field ] period
-      val add :
-        ([< Period.date_field > `Day `Week ] as 'a) period ->
-        'a period -> 'a period
-      val sub :
-        ([< Period.date_field > `Day `Week ] as 'a) period ->
-        'a period -> 'a period
-      val opp :
-        ([< Period.date_field > `Day `Week ] as 'a) period -> 'a period
-      val equal :
-        [< Period.date_field ] period ->
-        [< Period.date_field ] period -> bool
-      val compare :
-        [< Period.date_field ] period -> [< Period.date_field ] period -> int
-      val hash : [< Period.date_field ] period -> int
-      val make : int -> int -> int -> int -> int -> second -> t
-      val lmake :
-        ?year:int ->
-        ?month:int ->
-        ?day:int -> ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-      val year : int -> [< Period.date_field > `Year ] period
-      val month : int -> [< Period.date_field > `Month `Year ] period
-      val week : int -> [< Period.date_field > `Day `Week ] period
-      val day : int -> [< Period.date_field > `Day `Week ] period
-      val hour : int -> [< Period.date_field > `Day `Week ] period
-      val minute : int -> [< Period.date_field > `Day `Week ] period
-      val second : second -> [< Period.date_field > `Day `Week ] period
-      val from_date :
-        ([< Period.date_field ] as 'a) Date.Period.period -> 'a period
-      val from_time :
-        ([< Period.date_field ] as 'a) Time.Period.period -> 'a period
-      val to_date : ([< Date.field ] as 'a) period -> 'Date.Period.period
-      exception Not_computable
-      val to_time :
-        ([< Period.date_field ] as 'a) period -> 'Time.Period.period
-      val safe_to_time :
-        ([< `Day | `Week ] as 'a) period -> 'Time.Period.period
-      val ymds : [< Period.date_field ] period -> int * int * int * second
-    end
-  val add : t -> [< Period.date_field ] Period.period -> t
-  val sub : t -> t -> [< Period.date_field > `Day `Week ] Period.period
-  val precise_sub : t -> t -> Period.t
-  val rem : t -> [< Period.date_field ] Period.period -> t
-  val next : t -> field -> t
-  val prev : t -> field -> t
-end
\ No newline at end of file diff --git a/doc/type_Calendar.html b/doc/type_Calendar.html deleted file mode 100644 index 73dda6b..0000000 --- a/doc/type_Calendar.html +++ /dev/null @@ -1,648 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Calendar - - -sig
-  module Date :
-    sig
-      type field = Period.date_field
-      type -'a date = 'Date.date constraint 'a = [< field ]
-      type t = field date
-      type day = Date.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-      type month =
-        Date.month =
-          Jan
-        | Feb
-        | Mar
-        | Apr
-        | May
-        | Jun
-        | Jul
-        | Aug
-        | Sep
-        | Oct
-        | Nov
-        | Dec
-      type year = int
-      exception Out_of_bounds
-      exception Undefined
-      val make : year -> int -> int -> t
-      val lmake : year:year -> ?month:int -> ?day:int -> unit -> t
-      val make_year : int -> [< `Year ] date
-      val make_year_month : int -> int -> [< `Month | `Year ] date
-      val today : unit -> t
-      val from_jd : int -> t
-      val from_mjd : int -> t
-      val from_day_of_year : year -> int -> t
-      val days_in_month : [< field > `Month `Year ] date -> int
-      val day_of_week : t -> day
-      val day_of_month : t -> int
-      val day_of_year : t -> int
-      val week : t -> int
-      val month : [< field > `Month ] date -> month
-      val year : [< field > `Year ] date -> year
-      val to_jd : t -> int
-      val to_mjd : t -> int
-      val equal : [< field ] date -> [< field ] date -> bool
-      val compare : [< field ] date -> [< field ] date -> int
-      val hash : [< field ] date -> int
-      val is_valid_date : year -> int -> int -> bool
-      val is_leap_day : t -> bool
-      val is_gregorian : t -> bool
-      val is_julian : t -> bool
-      val to_unixtm : t -> Unix.tm
-      val from_unixtm : Unix.tm -> t
-      val to_unixfloat : t -> float
-      val from_unixfloat : float -> t
-      val to_business : t -> year * int * day
-      val from_business : year -> int -> day -> t
-      val int_of_day : day -> int
-      val day_of_int : int -> day
-      val int_of_month : month -> int
-      val month_of_int : int -> month
-      module Period :
-        sig
-          type +'a p = 'Date.Period.p constraint 'a = [< field ]
-          type +'a period = 'a p constraint 'a = [< field ]
-          type t = Period.date_field period
-          val empty : [< Period.date_field ] period
-          val add :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val sub :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val opp : ([< Period.date_field ] as 'a) period -> 'a period
-          val equal :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> bool
-          val compare :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> int
-          val hash : [< Period.date_field ] period -> int
-          val make : int -> int -> int -> t
-          val lmake : ?year:int -> ?month:int -> ?day:int -> unit -> t
-          val year : int -> [< field > `Year ] period
-          val month : int -> [< field > `Month `Year ] period
-          val week : int -> [< field > `Day `Week ] period
-          val day : int -> [< field > `Day `Week ] period
-          exception Not_computable
-          val nb_days : [< field ] period -> int
-          val safe_nb_days : [< `Day | `Week ] period -> int
-          val ymd : [< field ] period -> int * int * int
-        end
-      val add : ([< field ] as 'a) date -> 'Period.period -> 'a date
-      val sub :
-        ([< field ] as 'a) date ->
-        'a date -> [< field > `Day `Week ] Period.period
-      val precise_sub : ([< field ] as 'a) date -> 'a date -> Period.t
-      val rem : ([< field ] as 'a) date -> 'Period.period -> 'a date
-      val next : ([< field ] as 'a) date -> '-> 'a date
-      val prev : ([< field ] as 'a) date -> '-> 'a date
-      val is_leap_year : year -> bool
-      val same_calendar : year -> year -> bool
-      val days_in_year : ?month:month -> year -> int
-      val weeks_in_year : year -> int
-      val week_first_last : int -> year -> t * t
-      val nth_weekday_of_month : year -> month -> day -> int -> t
-      val century : year -> int
-      val millenium : year -> int
-      val solar_number : year -> int
-      val indiction : year -> int
-      val golden_number : year -> int
-      val epact : year -> int
-      val easter : year -> t
-      val carnaval : year -> t
-      val mardi_gras : year -> t
-      val ash : year -> t
-      val palm : year -> t
-      val easter_friday : year -> t
-      val easter_saturday : year -> t
-      val easter_monday : year -> t
-      val ascension : year -> t
-      val withsunday : year -> t
-      val withmonday : year -> t
-      val corpus_christi : year -> t
-    end
-  module Time :
-    sig
-      type t = Time.t
-      type field = [ `Hour | `Minute | `Second ]
-      type second = int
-      module Second :
-        sig
-          type t = second
-          val from_int : int -> t
-          val from_float : float -> t
-          val to_int : t -> int
-          val to_float : t -> float
-        end
-      val make : int -> int -> second -> t
-      val lmake : ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-      val now : unit -> t
-      val midnight : unit -> t
-      val midday : unit -> t
-      val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-      val from_gmt : t -> t
-      val to_gmt : t -> t
-      val normalize : t -> t * int
-      val hour : t -> int
-      val minute : t -> int
-      val second : t -> second
-      val to_seconds : t -> second
-      val to_minutes : t -> float
-      val to_hours : t -> float
-      val equal : t -> t -> bool
-      val compare : t -> t -> int
-      val hash : t -> int
-      val is_pm : t -> bool
-      val is_am : t -> bool
-      val from_seconds : second -> t
-      val from_minutes : float -> t
-      val from_hours : float -> t
-      module Period :
-        sig
-          type +'a period = 'Time.Period.period
-            constraint 'a = [< Period.date_field ]
-          type t = Period.date_field period
-          val empty : [< Period.date_field ] period
-          val add :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val sub :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val opp : ([< Period.date_field ] as 'a) period -> 'a period
-          val equal :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> bool
-          val compare :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> int
-          val hash : [< Period.date_field ] period -> int
-          val length : [< Period.date_field ] period -> second
-          val mul :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val div :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val make : int -> int -> second -> [< Period.date_field ] period
-          val lmake :
-            ?hour:int ->
-            ?minute:int ->
-            ?second:second -> unit -> [< Period.date_field ] period
-          val hour : int -> [< Period.date_field ] period
-          val minute : int -> [< Period.date_field ] period
-          val second : second -> [< Period.date_field ] period
-          val to_seconds : [< Period.date_field ] period -> second
-          val to_minutes : [< Period.date_field ] period -> float
-          val to_hours : [< Period.date_field ] period -> float
-        end
-      val add : t -> [< Period.date_field ] Period.period -> t
-      val sub : t -> t -> [< Period.date_field ] Period.period
-      val rem : t -> [< Period.date_field ] Period.period -> t
-      val next : t -> field -> t
-      val prev : t -> field -> t
-    end
-  type t
-  type day = Date.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-  type month =
-    Date.month =
-      Jan
-    | Feb
-    | Mar
-    | Apr
-    | May
-    | Jun
-    | Jul
-    | Aug
-    | Sep
-    | Oct
-    | Nov
-    | Dec
-  type year = Date.year
-  type second = Time.second
-  type field = [ `Day | `Hour | `Minute | `Month | `Second | `Week | `Year ]
-  val make : int -> int -> int -> int -> int -> second -> t
-  val lmake :
-    year:int ->
-    ?month:int ->
-    ?day:int -> ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-  val create : Date.t -> Time.t -> t
-  val now : unit -> t
-  val from_jd : float -> t
-  val from_mjd : float -> t
-  val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-  val to_gmt : t -> t
-  val from_gmt : t -> t
-  val days_in_month : t -> int
-  val day_of_week : t -> day
-  val day_of_month : t -> int
-  val day_of_year : t -> int
-  val week : t -> int
-  val month : t -> month
-  val year : t -> int
-  val to_jd : t -> float
-  val to_mjd : t -> float
-  val hour : t -> int
-  val minute : t -> int
-  val second : t -> second
-  val equal : t -> t -> bool
-  val compare : t -> t -> int
-  val hash : t -> int
-  val is_leap_day : t -> bool
-  val is_gregorian : t -> bool
-  val is_julian : t -> bool
-  val is_pm : t -> bool
-  val is_am : t -> bool
-  val to_unixtm : t -> Unix.tm
-  val from_unixtm : Unix.tm -> t
-  val to_unixfloat : t -> float
-  val from_unixfloat : float -> t
-  val from_date : Date.t -> t
-  val to_date : t -> Date.t
-  val to_time : t -> Time.t
-  module Period :
-    sig
-      type +'a period constraint 'a = [< Period.date_field ]
-      type t = Period.date_field period
-      val empty : [< Period.date_field ] period
-      val add :
-        ([< Period.date_field > `Day `Week ] as 'a) period ->
-        'a period -> 'a period
-      val sub :
-        ([< Period.date_field > `Day `Week ] as 'a) period ->
-        'a period -> 'a period
-      val opp :
-        ([< Period.date_field > `Day `Week ] as 'a) period -> 'a period
-      val equal :
-        [< Period.date_field ] period ->
-        [< Period.date_field ] period -> bool
-      val compare :
-        [< Period.date_field ] period -> [< Period.date_field ] period -> int
-      val hash : [< Period.date_field ] period -> int
-      val make : int -> int -> int -> int -> int -> second -> t
-      val lmake :
-        ?year:int ->
-        ?month:int ->
-        ?day:int -> ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-      val year : int -> [< Period.date_field > `Year ] period
-      val month : int -> [< Period.date_field > `Month `Year ] period
-      val week : int -> [< Period.date_field > `Day `Week ] period
-      val day : int -> [< Period.date_field > `Day `Week ] period
-      val hour : int -> [< Period.date_field > `Day `Week ] period
-      val minute : int -> [< Period.date_field > `Day `Week ] period
-      val second : second -> [< Period.date_field > `Day `Week ] period
-      val from_date :
-        ([< Period.date_field ] as 'a) Date.Period.period -> 'a period
-      val from_time :
-        ([< Period.date_field ] as 'a) Time.Period.period -> 'a period
-      val to_date : ([< Date.field ] as 'a) period -> 'Date.Period.period
-      exception Not_computable
-      val to_time :
-        ([< Period.date_field ] as 'a) period -> 'Time.Period.period
-      val safe_to_time :
-        ([< `Day | `Week ] as 'a) period -> 'Time.Period.period
-      val ymds : [< Period.date_field ] period -> int * int * int * second
-    end
-  val add : t -> [< Period.date_field ] Period.period -> t
-  val sub : t -> t -> [< Period.date_field > `Day `Week ] Period.period
-  val precise_sub : t -> t -> Period.t
-  val rem : t -> [< Period.date_field ] Period.period -> t
-  val next : t -> field -> t
-  val prev : t -> field -> t
-  module Precise :
-    sig
-      module Date :
-        sig
-          type field = Period.date_field
-          type -'a date = 'Date.date constraint 'a = [< field ]
-          type t = field date
-          type day = Date.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-          type month =
-            Date.month =
-              Jan
-            | Feb
-            | Mar
-            | Apr
-            | May
-            | Jun
-            | Jul
-            | Aug
-            | Sep
-            | Oct
-            | Nov
-            | Dec
-          type year = int
-          exception Out_of_bounds
-          exception Undefined
-          val make : year -> int -> int -> t
-          val lmake : year:year -> ?month:int -> ?day:int -> unit -> t
-          val make_year : int -> [< `Year ] date
-          val make_year_month : int -> int -> [< `Month | `Year ] date
-          val today : unit -> t
-          val from_jd : int -> t
-          val from_mjd : int -> t
-          val from_day_of_year : year -> int -> t
-          val days_in_month : [< field > `Month `Year ] date -> int
-          val day_of_week : t -> day
-          val day_of_month : t -> int
-          val day_of_year : t -> int
-          val week : t -> int
-          val month : [< field > `Month ] date -> month
-          val year : [< field > `Year ] date -> year
-          val to_jd : t -> int
-          val to_mjd : t -> int
-          val equal : [< field ] date -> [< field ] date -> bool
-          val compare : [< field ] date -> [< field ] date -> int
-          val hash : [< field ] date -> int
-          val is_valid_date : year -> int -> int -> bool
-          val is_leap_day : t -> bool
-          val is_gregorian : t -> bool
-          val is_julian : t -> bool
-          val to_unixtm : t -> Unix.tm
-          val from_unixtm : Unix.tm -> t
-          val to_unixfloat : t -> float
-          val from_unixfloat : float -> t
-          val to_business : t -> year * int * day
-          val from_business : year -> int -> day -> t
-          val int_of_day : day -> int
-          val day_of_int : int -> day
-          val int_of_month : month -> int
-          val month_of_int : int -> month
-          module Period :
-            sig
-              type +'a p = 'Date.Period.p constraint 'a = [< field ]
-              type +'a period = 'a p constraint 'a = [< field ]
-              type t = Period.date_field period
-              val empty : [< Period.date_field ] period
-              val add :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val sub :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val opp : ([< Period.date_field ] as 'a) period -> 'a period
-              val equal :
-                [< Period.date_field ] period ->
-                [< Period.date_field ] period -> bool
-              val compare :
-                [< Period.date_field ] period ->
-                [< Period.date_field ] period -> int
-              val hash : [< Period.date_field ] period -> int
-              val make : int -> int -> int -> t
-              val lmake : ?year:int -> ?month:int -> ?day:int -> unit -> t
-              val year : int -> [< field > `Year ] period
-              val month : int -> [< field > `Month `Year ] period
-              val week : int -> [< field > `Day `Week ] period
-              val day : int -> [< field > `Day `Week ] period
-              exception Not_computable
-              val nb_days : [< field ] period -> int
-              val safe_nb_days : [< `Day | `Week ] period -> int
-              val ymd : [< field ] period -> int * int * int
-            end
-          val add : ([< field ] as 'a) date -> 'Period.period -> 'a date
-          val sub :
-            ([< field ] as 'a) date ->
-            'a date -> [< field > `Day `Week ] Period.period
-          val precise_sub : ([< field ] as 'a) date -> 'a date -> Period.t
-          val rem : ([< field ] as 'a) date -> 'Period.period -> 'a date
-          val next : ([< field ] as 'a) date -> '-> 'a date
-          val prev : ([< field ] as 'a) date -> '-> 'a date
-          val is_leap_year : year -> bool
-          val same_calendar : year -> year -> bool
-          val days_in_year : ?month:month -> year -> int
-          val weeks_in_year : year -> int
-          val week_first_last : int -> year -> t * t
-          val nth_weekday_of_month : year -> month -> day -> int -> t
-          val century : year -> int
-          val millenium : year -> int
-          val solar_number : year -> int
-          val indiction : year -> int
-          val golden_number : year -> int
-          val epact : year -> int
-          val easter : year -> t
-          val carnaval : year -> t
-          val mardi_gras : year -> t
-          val ash : year -> t
-          val palm : year -> t
-          val easter_friday : year -> t
-          val easter_saturday : year -> t
-          val easter_monday : year -> t
-          val ascension : year -> t
-          val withsunday : year -> t
-          val withmonday : year -> t
-          val corpus_christi : year -> t
-        end
-      module Time :
-        sig
-          type t = Time.t
-          type field = [ `Hour | `Minute | `Second ]
-          type second = int
-          module Second :
-            sig
-              type t = second
-              val from_int : int -> t
-              val from_float : float -> t
-              val to_int : t -> int
-              val to_float : t -> float
-            end
-          val make : int -> int -> second -> t
-          val lmake : ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-          val now : unit -> t
-          val midnight : unit -> t
-          val midday : unit -> t
-          val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-          val from_gmt : t -> t
-          val to_gmt : t -> t
-          val normalize : t -> t * int
-          val hour : t -> int
-          val minute : t -> int
-          val second : t -> second
-          val to_seconds : t -> second
-          val to_minutes : t -> float
-          val to_hours : t -> float
-          val equal : t -> t -> bool
-          val compare : t -> t -> int
-          val hash : t -> int
-          val is_pm : t -> bool
-          val is_am : t -> bool
-          val from_seconds : second -> t
-          val from_minutes : float -> t
-          val from_hours : float -> t
-          module Period :
-            sig
-              type +'a period = 'Time.Period.period
-                constraint 'a = [< Period.date_field ]
-              type t = Period.date_field period
-              val empty : [< Period.date_field ] period
-              val add :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val sub :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val opp : ([< Period.date_field ] as 'a) period -> 'a period
-              val equal :
-                [< Period.date_field ] period ->
-                [< Period.date_field ] period -> bool
-              val compare :
-                [< Period.date_field ] period ->
-                [< Period.date_field ] period -> int
-              val hash : [< Period.date_field ] period -> int
-              val length : [< Period.date_field ] period -> second
-              val mul :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val div :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val make :
-                int -> int -> second -> [< Period.date_field ] period
-              val lmake :
-                ?hour:int ->
-                ?minute:int ->
-                ?second:second -> unit -> [< Period.date_field ] period
-              val hour : int -> [< Period.date_field ] period
-              val minute : int -> [< Period.date_field ] period
-              val second : second -> [< Period.date_field ] period
-              val to_seconds : [< Period.date_field ] period -> second
-              val to_minutes : [< Period.date_field ] period -> float
-              val to_hours : [< Period.date_field ] period -> float
-            end
-          val add : t -> [< Period.date_field ] Period.period -> t
-          val sub : t -> t -> [< Period.date_field ] Period.period
-          val rem : t -> [< Period.date_field ] Period.period -> t
-          val next : t -> field -> t
-          val prev : t -> field -> t
-        end
-      type t
-      type day = Date.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-      type month =
-        Date.month =
-          Jan
-        | Feb
-        | Mar
-        | Apr
-        | May
-        | Jun
-        | Jul
-        | Aug
-        | Sep
-        | Oct
-        | Nov
-        | Dec
-      type year = Date.year
-      type second = Time.second
-      type field =
-          [ `Day | `Hour | `Minute | `Month | `Second | `Week | `Year ]
-      val make : int -> int -> int -> int -> int -> second -> t
-      val lmake :
-        year:int ->
-        ?month:int ->
-        ?day:int -> ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-      val create : Date.t -> Time.t -> t
-      val now : unit -> t
-      val from_jd : float -> t
-      val from_mjd : float -> t
-      val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-      val to_gmt : t -> t
-      val from_gmt : t -> t
-      val days_in_month : t -> int
-      val day_of_week : t -> day
-      val day_of_month : t -> int
-      val day_of_year : t -> int
-      val week : t -> int
-      val month : t -> month
-      val year : t -> int
-      val to_jd : t -> float
-      val to_mjd : t -> float
-      val hour : t -> int
-      val minute : t -> int
-      val second : t -> second
-      val equal : t -> t -> bool
-      val compare : t -> t -> int
-      val hash : t -> int
-      val is_leap_day : t -> bool
-      val is_gregorian : t -> bool
-      val is_julian : t -> bool
-      val is_pm : t -> bool
-      val is_am : t -> bool
-      val to_unixtm : t -> Unix.tm
-      val from_unixtm : Unix.tm -> t
-      val to_unixfloat : t -> float
-      val from_unixfloat : float -> t
-      val from_date : Date.t -> t
-      val to_date : t -> Date.t
-      val to_time : t -> Time.t
-      module Period :
-        sig
-          type +'a period constraint 'a = [< Period.date_field ]
-          type t = Period.date_field period
-          val empty : [< Period.date_field ] period
-          val add :
-            ([< Period.date_field > `Day `Week ] as 'a) period ->
-            'a period -> 'a period
-          val sub :
-            ([< Period.date_field > `Day `Week ] as 'a) period ->
-            'a period -> 'a period
-          val opp :
-            ([< Period.date_field > `Day `Week ] as 'a) period -> 'a period
-          val equal :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> bool
-          val compare :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> int
-          val hash : [< Period.date_field ] period -> int
-          val make : int -> int -> int -> int -> int -> second -> t
-          val lmake :
-            ?year:int ->
-            ?month:int ->
-            ?day:int ->
-            ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-          val year : int -> [< Period.date_field > `Year ] period
-          val month : int -> [< Period.date_field > `Month `Year ] period
-          val week : int -> [< Period.date_field > `Day `Week ] period
-          val day : int -> [< Period.date_field > `Day `Week ] period
-          val hour : int -> [< Period.date_field > `Day `Week ] period
-          val minute : int -> [< Period.date_field > `Day `Week ] period
-          val second : second -> [< Period.date_field > `Day `Week ] period
-          val from_date :
-            ([< Period.date_field ] as 'a) Date.Period.period -> 'a period
-          val from_time :
-            ([< Period.date_field ] as 'a) Time.Period.period -> 'a period
-          val to_date :
-            ([< Date.field ] as 'a) period -> 'Date.Period.period
-          exception Not_computable
-          val to_time :
-            ([< Period.date_field ] as 'a) period -> 'Time.Period.period
-          val safe_to_time :
-            ([< `Day | `Week ] as 'a) period -> 'Time.Period.period
-          val ymds :
-            [< Period.date_field ] period -> int * int * int * second
-        end
-      val add : t -> [< Period.date_field ] Period.period -> t
-      val sub : t -> t -> [< Period.date_field > `Day `Week ] Period.period
-      val precise_sub : t -> t -> Period.t
-      val rem : t -> [< Period.date_field ] Period.period -> t
-      val next : t -> field -> t
-      val prev : t -> field -> t
-    end
-end
\ No newline at end of file diff --git a/doc/type_Calendar_builder.Make.html b/doc/type_Calendar_builder.Make.html deleted file mode 100644 index dd746ac..0000000 --- a/doc/type_Calendar_builder.Make.html +++ /dev/null @@ -1,344 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Calendar_builder.Make - - -functor (D : Date_sig.S->
-  functor (T : Time_sig.S->
-    sig
-      module Date :
-        sig
-          type field = Period.date_field
-          type -'a date = 'D.date constraint 'a = [< field ]
-          type t = field date
-          type day = D.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-          type month =
-            D.month =
-              Jan
-            | Feb
-            | Mar
-            | Apr
-            | May
-            | Jun
-            | Jul
-            | Aug
-            | Sep
-            | Oct
-            | Nov
-            | Dec
-          type year = int
-          exception Out_of_bounds
-          exception Undefined
-          val make : year -> int -> int -> t
-          val lmake : year:year -> ?month:int -> ?day:int -> unit -> t
-          val make_year : int -> [< `Year ] date
-          val make_year_month : int -> int -> [< `Month | `Year ] date
-          val today : unit -> t
-          val from_jd : int -> t
-          val from_mjd : int -> t
-          val from_day_of_year : year -> int -> t
-          val days_in_month : [< field > `Month `Year ] date -> int
-          val day_of_week : t -> day
-          val day_of_month : t -> int
-          val day_of_year : t -> int
-          val week : t -> int
-          val month : [< field > `Month ] date -> month
-          val year : [< field > `Year ] date -> year
-          val to_jd : t -> int
-          val to_mjd : t -> int
-          val equal : [< field ] date -> [< field ] date -> bool
-          val compare : [< field ] date -> [< field ] date -> int
-          val hash : [< field ] date -> int
-          val is_valid_date : year -> int -> int -> bool
-          val is_leap_day : t -> bool
-          val is_gregorian : t -> bool
-          val is_julian : t -> bool
-          val to_unixtm : t -> Unix.tm
-          val from_unixtm : Unix.tm -> t
-          val to_unixfloat : t -> float
-          val from_unixfloat : float -> t
-          val to_business : t -> year * int * day
-          val from_business : year -> int -> day -> t
-          val int_of_day : day -> int
-          val day_of_int : int -> day
-          val int_of_month : month -> int
-          val month_of_int : int -> month
-          module Period :
-            sig
-              type +'a p = 'D.Period.p constraint 'a = [< field ]
-              type +'a period = 'a p constraint 'a = [< field ]
-              type t = Period.date_field period
-              val empty : [< Period.date_field ] period
-              val add :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val sub :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val opp : ([< Period.date_field ] as 'a) period -> 'a period
-              val equal :
-                [< Period.date_field ] period ->
-                [< Period.date_field ] period -> bool
-              val compare :
-                [< Period.date_field ] period ->
-                [< Period.date_field ] period -> int
-              val hash : [< Period.date_field ] period -> int
-              val make : int -> int -> int -> t
-              val lmake : ?year:int -> ?month:int -> ?day:int -> unit -> t
-              val year : int -> [< field > `Year ] period
-              val month : int -> [< field > `Month `Year ] period
-              val week : int -> [< field > `Day `Week ] period
-              val day : int -> [< field > `Day `Week ] period
-              exception Not_computable
-              val nb_days : [< field ] period -> int
-              val safe_nb_days : [< `Day | `Week ] period -> int
-              val ymd : [< field ] period -> int * int * int
-            end
-          val add : ([< field ] as 'a) date -> 'Period.period -> 'a date
-          val sub :
-            ([< field ] as 'a) date ->
-            'a date -> [< field > `Day `Week ] Period.period
-          val precise_sub : ([< field ] as 'a) date -> 'a date -> Period.t
-          val rem : ([< field ] as 'a) date -> 'Period.period -> 'a date
-          val next : ([< field ] as 'a) date -> '-> 'a date
-          val prev : ([< field ] as 'a) date -> '-> 'a date
-          val is_leap_year : year -> bool
-          val same_calendar : year -> year -> bool
-          val days_in_year : ?month:month -> year -> int
-          val weeks_in_year : year -> int
-          val week_first_last : int -> year -> t * t
-          val nth_weekday_of_month : year -> month -> day -> int -> t
-          val century : year -> int
-          val millenium : year -> int
-          val solar_number : year -> int
-          val indiction : year -> int
-          val golden_number : year -> int
-          val epact : year -> int
-          val easter : year -> t
-          val carnaval : year -> t
-          val mardi_gras : year -> t
-          val ash : year -> t
-          val palm : year -> t
-          val easter_friday : year -> t
-          val easter_saturday : year -> t
-          val easter_monday : year -> t
-          val ascension : year -> t
-          val withsunday : year -> t
-          val withmonday : year -> t
-          val corpus_christi : year -> t
-        end
-      module Time :
-        sig
-          type t = T.t
-          type field = [ `Hour | `Minute | `Second ]
-          type second = T.second
-          module Second :
-            sig
-              type t = second
-              val from_int : int -> t
-              val from_float : float -> t
-              val to_int : t -> int
-              val to_float : t -> float
-            end
-          val make : int -> int -> second -> t
-          val lmake : ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-          val now : unit -> t
-          val midnight : unit -> t
-          val midday : unit -> t
-          val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-          val from_gmt : t -> t
-          val to_gmt : t -> t
-          val normalize : t -> t * int
-          val hour : t -> int
-          val minute : t -> int
-          val second : t -> second
-          val to_seconds : t -> second
-          val to_minutes : t -> float
-          val to_hours : t -> float
-          val equal : t -> t -> bool
-          val compare : t -> t -> int
-          val hash : t -> int
-          val is_pm : t -> bool
-          val is_am : t -> bool
-          val from_seconds : second -> t
-          val from_minutes : float -> t
-          val from_hours : float -> t
-          module Period :
-            sig
-              type +'a period = 'T.Period.period
-                constraint 'a = [< Period.date_field ]
-              type t = Period.date_field period
-              val empty : [< Period.date_field ] period
-              val add :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val sub :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val opp : ([< Period.date_field ] as 'a) period -> 'a period
-              val equal :
-                [< Period.date_field ] period ->
-                [< Period.date_field ] period -> bool
-              val compare :
-                [< Period.date_field ] period ->
-                [< Period.date_field ] period -> int
-              val hash : [< Period.date_field ] period -> int
-              val length : [< Period.date_field ] period -> second
-              val mul :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val div :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val make :
-                int -> int -> second -> [< Period.date_field ] period
-              val lmake :
-                ?hour:int ->
-                ?minute:int ->
-                ?second:second -> unit -> [< Period.date_field ] period
-              val hour : int -> [< Period.date_field ] period
-              val minute : int -> [< Period.date_field ] period
-              val second : second -> [< Period.date_field ] period
-              val to_seconds : [< Period.date_field ] period -> second
-              val to_minutes : [< Period.date_field ] period -> float
-              val to_hours : [< Period.date_field ] period -> float
-            end
-          val add : t -> [< Period.date_field ] Period.period -> t
-          val sub : t -> t -> [< Period.date_field ] Period.period
-          val rem : t -> [< Period.date_field ] Period.period -> t
-          val next : t -> field -> t
-          val prev : t -> field -> t
-        end
-      type t
-      type day = Date.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-      type month =
-        Date.month =
-          Jan
-        | Feb
-        | Mar
-        | Apr
-        | May
-        | Jun
-        | Jul
-        | Aug
-        | Sep
-        | Oct
-        | Nov
-        | Dec
-      type year = Date.year
-      type second = Time.second
-      type field =
-          [ `Day | `Hour | `Minute | `Month | `Second | `Week | `Year ]
-      val make : int -> int -> int -> int -> int -> second -> t
-      val lmake :
-        year:int ->
-        ?month:int ->
-        ?day:int -> ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-      val create : Date.t -> Time.t -> t
-      val now : unit -> t
-      val from_jd : float -> t
-      val from_mjd : float -> t
-      val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-      val to_gmt : t -> t
-      val from_gmt : t -> t
-      val days_in_month : t -> int
-      val day_of_week : t -> day
-      val day_of_month : t -> int
-      val day_of_year : t -> int
-      val week : t -> int
-      val month : t -> month
-      val year : t -> int
-      val to_jd : t -> float
-      val to_mjd : t -> float
-      val hour : t -> int
-      val minute : t -> int
-      val second : t -> second
-      val equal : t -> t -> bool
-      val compare : t -> t -> int
-      val hash : t -> int
-      val is_leap_day : t -> bool
-      val is_gregorian : t -> bool
-      val is_julian : t -> bool
-      val is_pm : t -> bool
-      val is_am : t -> bool
-      val to_unixtm : t -> Unix.tm
-      val from_unixtm : Unix.tm -> t
-      val to_unixfloat : t -> float
-      val from_unixfloat : float -> t
-      val from_date : Date.t -> t
-      val to_date : t -> Date.t
-      val to_time : t -> Time.t
-      module Period :
-        sig
-          type +'a period constraint 'a = [< Period.date_field ]
-          type t = Period.date_field period
-          val empty : [< Period.date_field ] period
-          val add :
-            ([< Period.date_field > `Day `Week ] as 'a) period ->
-            'a period -> 'a period
-          val sub :
-            ([< Period.date_field > `Day `Week ] as 'a) period ->
-            'a period -> 'a period
-          val opp :
-            ([< Period.date_field > `Day `Week ] as 'a) period -> 'a period
-          val equal :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> bool
-          val compare :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> int
-          val hash : [< Period.date_field ] period -> int
-          val make : int -> int -> int -> int -> int -> second -> t
-          val lmake :
-            ?year:int ->
-            ?month:int ->
-            ?day:int ->
-            ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-          val year : int -> [< Period.date_field > `Year ] period
-          val month : int -> [< Period.date_field > `Month `Year ] period
-          val week : int -> [< Period.date_field > `Day `Week ] period
-          val day : int -> [< Period.date_field > `Day `Week ] period
-          val hour : int -> [< Period.date_field > `Day `Week ] period
-          val minute : int -> [< Period.date_field > `Day `Week ] period
-          val second : second -> [< Period.date_field > `Day `Week ] period
-          val from_date :
-            ([< Period.date_field ] as 'a) Date.Period.period -> 'a period
-          val from_time :
-            ([< Period.date_field ] as 'a) Time.Period.period -> 'a period
-          val to_date :
-            ([< Date.field ] as 'a) period -> 'Date.Period.period
-          exception Not_computable
-          val to_time :
-            ([< Period.date_field ] as 'a) period -> 'Time.Period.period
-          val safe_to_time :
-            ([< `Day | `Week ] as 'a) period -> 'Time.Period.period
-          val ymds :
-            [< Period.date_field ] period -> int * int * int * second
-        end
-      val add : t -> [< Period.date_field ] Period.period -> t
-      val sub : t -> t -> [< Period.date_field > `Day `Week ] Period.period
-      val precise_sub : t -> t -> Period.t
-      val rem : t -> [< Period.date_field ] Period.period -> t
-      val next : t -> field -> t
-      val prev : t -> field -> t
-    end
\ No newline at end of file diff --git a/doc/type_Calendar_builder.Make_Precise.html b/doc/type_Calendar_builder.Make_Precise.html deleted file mode 100644 index 9db6826..0000000 --- a/doc/type_Calendar_builder.Make_Precise.html +++ /dev/null @@ -1,344 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Calendar_builder.Make_Precise - - -functor (D : Date_sig.S->
-  functor (T : Time_sig.S->
-    sig
-      module Date :
-        sig
-          type field = Period.date_field
-          type -'a date = 'D.date constraint 'a = [< field ]
-          type t = field date
-          type day = D.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-          type month =
-            D.month =
-              Jan
-            | Feb
-            | Mar
-            | Apr
-            | May
-            | Jun
-            | Jul
-            | Aug
-            | Sep
-            | Oct
-            | Nov
-            | Dec
-          type year = int
-          exception Out_of_bounds
-          exception Undefined
-          val make : year -> int -> int -> t
-          val lmake : year:year -> ?month:int -> ?day:int -> unit -> t
-          val make_year : int -> [< `Year ] date
-          val make_year_month : int -> int -> [< `Month | `Year ] date
-          val today : unit -> t
-          val from_jd : int -> t
-          val from_mjd : int -> t
-          val from_day_of_year : year -> int -> t
-          val days_in_month : [< field > `Month `Year ] date -> int
-          val day_of_week : t -> day
-          val day_of_month : t -> int
-          val day_of_year : t -> int
-          val week : t -> int
-          val month : [< field > `Month ] date -> month
-          val year : [< field > `Year ] date -> year
-          val to_jd : t -> int
-          val to_mjd : t -> int
-          val equal : [< field ] date -> [< field ] date -> bool
-          val compare : [< field ] date -> [< field ] date -> int
-          val hash : [< field ] date -> int
-          val is_valid_date : year -> int -> int -> bool
-          val is_leap_day : t -> bool
-          val is_gregorian : t -> bool
-          val is_julian : t -> bool
-          val to_unixtm : t -> Unix.tm
-          val from_unixtm : Unix.tm -> t
-          val to_unixfloat : t -> float
-          val from_unixfloat : float -> t
-          val to_business : t -> year * int * day
-          val from_business : year -> int -> day -> t
-          val int_of_day : day -> int
-          val day_of_int : int -> day
-          val int_of_month : month -> int
-          val month_of_int : int -> month
-          module Period :
-            sig
-              type +'a p = 'D.Period.p constraint 'a = [< field ]
-              type +'a period = 'a p constraint 'a = [< field ]
-              type t = Period.date_field period
-              val empty : [< Period.date_field ] period
-              val add :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val sub :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val opp : ([< Period.date_field ] as 'a) period -> 'a period
-              val equal :
-                [< Period.date_field ] period ->
-                [< Period.date_field ] period -> bool
-              val compare :
-                [< Period.date_field ] period ->
-                [< Period.date_field ] period -> int
-              val hash : [< Period.date_field ] period -> int
-              val make : int -> int -> int -> t
-              val lmake : ?year:int -> ?month:int -> ?day:int -> unit -> t
-              val year : int -> [< field > `Year ] period
-              val month : int -> [< field > `Month `Year ] period
-              val week : int -> [< field > `Day `Week ] period
-              val day : int -> [< field > `Day `Week ] period
-              exception Not_computable
-              val nb_days : [< field ] period -> int
-              val safe_nb_days : [< `Day | `Week ] period -> int
-              val ymd : [< field ] period -> int * int * int
-            end
-          val add : ([< field ] as 'a) date -> 'Period.period -> 'a date
-          val sub :
-            ([< field ] as 'a) date ->
-            'a date -> [< field > `Day `Week ] Period.period
-          val precise_sub : ([< field ] as 'a) date -> 'a date -> Period.t
-          val rem : ([< field ] as 'a) date -> 'Period.period -> 'a date
-          val next : ([< field ] as 'a) date -> '-> 'a date
-          val prev : ([< field ] as 'a) date -> '-> 'a date
-          val is_leap_year : year -> bool
-          val same_calendar : year -> year -> bool
-          val days_in_year : ?month:month -> year -> int
-          val weeks_in_year : year -> int
-          val week_first_last : int -> year -> t * t
-          val nth_weekday_of_month : year -> month -> day -> int -> t
-          val century : year -> int
-          val millenium : year -> int
-          val solar_number : year -> int
-          val indiction : year -> int
-          val golden_number : year -> int
-          val epact : year -> int
-          val easter : year -> t
-          val carnaval : year -> t
-          val mardi_gras : year -> t
-          val ash : year -> t
-          val palm : year -> t
-          val easter_friday : year -> t
-          val easter_saturday : year -> t
-          val easter_monday : year -> t
-          val ascension : year -> t
-          val withsunday : year -> t
-          val withmonday : year -> t
-          val corpus_christi : year -> t
-        end
-      module Time :
-        sig
-          type t = T.t
-          type field = [ `Hour | `Minute | `Second ]
-          type second = T.second
-          module Second :
-            sig
-              type t = second
-              val from_int : int -> t
-              val from_float : float -> t
-              val to_int : t -> int
-              val to_float : t -> float
-            end
-          val make : int -> int -> second -> t
-          val lmake : ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-          val now : unit -> t
-          val midnight : unit -> t
-          val midday : unit -> t
-          val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-          val from_gmt : t -> t
-          val to_gmt : t -> t
-          val normalize : t -> t * int
-          val hour : t -> int
-          val minute : t -> int
-          val second : t -> second
-          val to_seconds : t -> second
-          val to_minutes : t -> float
-          val to_hours : t -> float
-          val equal : t -> t -> bool
-          val compare : t -> t -> int
-          val hash : t -> int
-          val is_pm : t -> bool
-          val is_am : t -> bool
-          val from_seconds : second -> t
-          val from_minutes : float -> t
-          val from_hours : float -> t
-          module Period :
-            sig
-              type +'a period = 'T.Period.period
-                constraint 'a = [< Period.date_field ]
-              type t = Period.date_field period
-              val empty : [< Period.date_field ] period
-              val add :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val sub :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val opp : ([< Period.date_field ] as 'a) period -> 'a period
-              val equal :
-                [< Period.date_field ] period ->
-                [< Period.date_field ] period -> bool
-              val compare :
-                [< Period.date_field ] period ->
-                [< Period.date_field ] period -> int
-              val hash : [< Period.date_field ] period -> int
-              val length : [< Period.date_field ] period -> second
-              val mul :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val div :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val make :
-                int -> int -> second -> [< Period.date_field ] period
-              val lmake :
-                ?hour:int ->
-                ?minute:int ->
-                ?second:second -> unit -> [< Period.date_field ] period
-              val hour : int -> [< Period.date_field ] period
-              val minute : int -> [< Period.date_field ] period
-              val second : second -> [< Period.date_field ] period
-              val to_seconds : [< Period.date_field ] period -> second
-              val to_minutes : [< Period.date_field ] period -> float
-              val to_hours : [< Period.date_field ] period -> float
-            end
-          val add : t -> [< Period.date_field ] Period.period -> t
-          val sub : t -> t -> [< Period.date_field ] Period.period
-          val rem : t -> [< Period.date_field ] Period.period -> t
-          val next : t -> field -> t
-          val prev : t -> field -> t
-        end
-      type t
-      type day = Date.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-      type month =
-        Date.month =
-          Jan
-        | Feb
-        | Mar
-        | Apr
-        | May
-        | Jun
-        | Jul
-        | Aug
-        | Sep
-        | Oct
-        | Nov
-        | Dec
-      type year = Date.year
-      type second = Time.second
-      type field =
-          [ `Day | `Hour | `Minute | `Month | `Second | `Week | `Year ]
-      val make : int -> int -> int -> int -> int -> second -> t
-      val lmake :
-        year:int ->
-        ?month:int ->
-        ?day:int -> ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-      val create : Date.t -> Time.t -> t
-      val now : unit -> t
-      val from_jd : float -> t
-      val from_mjd : float -> t
-      val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-      val to_gmt : t -> t
-      val from_gmt : t -> t
-      val days_in_month : t -> int
-      val day_of_week : t -> day
-      val day_of_month : t -> int
-      val day_of_year : t -> int
-      val week : t -> int
-      val month : t -> month
-      val year : t -> int
-      val to_jd : t -> float
-      val to_mjd : t -> float
-      val hour : t -> int
-      val minute : t -> int
-      val second : t -> second
-      val equal : t -> t -> bool
-      val compare : t -> t -> int
-      val hash : t -> int
-      val is_leap_day : t -> bool
-      val is_gregorian : t -> bool
-      val is_julian : t -> bool
-      val is_pm : t -> bool
-      val is_am : t -> bool
-      val to_unixtm : t -> Unix.tm
-      val from_unixtm : Unix.tm -> t
-      val to_unixfloat : t -> float
-      val from_unixfloat : float -> t
-      val from_date : Date.t -> t
-      val to_date : t -> Date.t
-      val to_time : t -> Time.t
-      module Period :
-        sig
-          type +'a period constraint 'a = [< Period.date_field ]
-          type t = Period.date_field period
-          val empty : [< Period.date_field ] period
-          val add :
-            ([< Period.date_field > `Day `Week ] as 'a) period ->
-            'a period -> 'a period
-          val sub :
-            ([< Period.date_field > `Day `Week ] as 'a) period ->
-            'a period -> 'a period
-          val opp :
-            ([< Period.date_field > `Day `Week ] as 'a) period -> 'a period
-          val equal :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> bool
-          val compare :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> int
-          val hash : [< Period.date_field ] period -> int
-          val make : int -> int -> int -> int -> int -> second -> t
-          val lmake :
-            ?year:int ->
-            ?month:int ->
-            ?day:int ->
-            ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-          val year : int -> [< Period.date_field > `Year ] period
-          val month : int -> [< Period.date_field > `Month `Year ] period
-          val week : int -> [< Period.date_field > `Day `Week ] period
-          val day : int -> [< Period.date_field > `Day `Week ] period
-          val hour : int -> [< Period.date_field > `Day `Week ] period
-          val minute : int -> [< Period.date_field > `Day `Week ] period
-          val second : second -> [< Period.date_field > `Day `Week ] period
-          val from_date :
-            ([< Period.date_field ] as 'a) Date.Period.period -> 'a period
-          val from_time :
-            ([< Period.date_field ] as 'a) Time.Period.period -> 'a period
-          val to_date :
-            ([< Date.field ] as 'a) period -> 'Date.Period.period
-          exception Not_computable
-          val to_time :
-            ([< Period.date_field ] as 'a) period -> 'Time.Period.period
-          val safe_to_time :
-            ([< `Day | `Week ] as 'a) period -> 'Time.Period.period
-          val ymds :
-            [< Period.date_field ] period -> int * int * int * second
-        end
-      val add : t -> [< Period.date_field ] Period.period -> t
-      val sub : t -> t -> [< Period.date_field > `Day `Week ] Period.period
-      val precise_sub : t -> t -> Period.t
-      val rem : t -> [< Period.date_field ] Period.period -> t
-      val next : t -> field -> t
-      val prev : t -> field -> t
-    end
\ No newline at end of file diff --git a/doc/type_Calendar_builder.html b/doc/type_Calendar_builder.html deleted file mode 100644 index 2339793..0000000 --- a/doc/type_Calendar_builder.html +++ /dev/null @@ -1,695 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Calendar_builder - - -sig
-  module Make :
-    functor (D : Date_sig.S->
-      functor (T : Time_sig.S->
-        sig
-          module Date :
-            sig
-              type field = Period.date_field
-              type -'a date = 'D.date constraint 'a = [< field ]
-              type t = field date
-              type day = D.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-              type month =
-                D.month =
-                  Jan
-                | Feb
-                | Mar
-                | Apr
-                | May
-                | Jun
-                | Jul
-                | Aug
-                | Sep
-                | Oct
-                | Nov
-                | Dec
-              type year = int
-              exception Out_of_bounds
-              exception Undefined
-              val make : year -> int -> int -> t
-              val lmake : year:year -> ?month:int -> ?day:int -> unit -> t
-              val make_year : int -> [< `Year ] date
-              val make_year_month : int -> int -> [< `Month | `Year ] date
-              val today : unit -> t
-              val from_jd : int -> t
-              val from_mjd : int -> t
-              val from_day_of_year : year -> int -> t
-              val days_in_month : [< field > `Month `Year ] date -> int
-              val day_of_week : t -> day
-              val day_of_month : t -> int
-              val day_of_year : t -> int
-              val week : t -> int
-              val month : [< field > `Month ] date -> month
-              val year : [< field > `Year ] date -> year
-              val to_jd : t -> int
-              val to_mjd : t -> int
-              val equal : [< field ] date -> [< field ] date -> bool
-              val compare : [< field ] date -> [< field ] date -> int
-              val hash : [< field ] date -> int
-              val is_valid_date : year -> int -> int -> bool
-              val is_leap_day : t -> bool
-              val is_gregorian : t -> bool
-              val is_julian : t -> bool
-              val to_unixtm : t -> Unix.tm
-              val from_unixtm : Unix.tm -> t
-              val to_unixfloat : t -> float
-              val from_unixfloat : float -> t
-              val to_business : t -> year * int * day
-              val from_business : year -> int -> day -> t
-              val int_of_day : day -> int
-              val day_of_int : int -> day
-              val int_of_month : month -> int
-              val month_of_int : int -> month
-              module Period :
-                sig
-                  type +'a p = 'D.Period.p constraint 'a = [< field ]
-                  type +'a period = 'a p constraint 'a = [< field ]
-                  type t = Period.date_field period
-                  val empty : [< Period.date_field ] period
-                  val add :
-                    ([< Period.date_field ] as 'a) period ->
-                    'a period -> 'a period
-                  val sub :
-                    ([< Period.date_field ] as 'a) period ->
-                    'a period -> 'a period
-                  val opp :
-                    ([< Period.date_field ] as 'a) period -> 'a period
-                  val equal :
-                    [< Period.date_field ] period ->
-                    [< Period.date_field ] period -> bool
-                  val compare :
-                    [< Period.date_field ] period ->
-                    [< Period.date_field ] period -> int
-                  val hash : [< Period.date_field ] period -> int
-                  val make : int -> int -> int -> t
-                  val lmake :
-                    ?year:int -> ?month:int -> ?day:int -> unit -> t
-                  val year : int -> [< field > `Year ] period
-                  val month : int -> [< field > `Month `Year ] period
-                  val week : int -> [< field > `Day `Week ] period
-                  val day : int -> [< field > `Day `Week ] period
-                  exception Not_computable
-                  val nb_days : [< field ] period -> int
-                  val safe_nb_days : [< `Day | `Week ] period -> int
-                  val ymd : [< field ] period -> int * int * int
-                end
-              val add :
-                ([< field ] as 'a) date -> 'Period.period -> 'a date
-              val sub :
-                ([< field ] as 'a) date ->
-                'a date -> [< field > `Day `Week ] Period.period
-              val precise_sub :
-                ([< field ] as 'a) date -> 'a date -> Period.t
-              val rem :
-                ([< field ] as 'a) date -> 'Period.period -> 'a date
-              val next : ([< field ] as 'a) date -> '-> 'a date
-              val prev : ([< field ] as 'a) date -> '-> 'a date
-              val is_leap_year : year -> bool
-              val same_calendar : year -> year -> bool
-              val days_in_year : ?month:month -> year -> int
-              val weeks_in_year : year -> int
-              val week_first_last : int -> year -> t * t
-              val nth_weekday_of_month : year -> month -> day -> int -> t
-              val century : year -> int
-              val millenium : year -> int
-              val solar_number : year -> int
-              val indiction : year -> int
-              val golden_number : year -> int
-              val epact : year -> int
-              val easter : year -> t
-              val carnaval : year -> t
-              val mardi_gras : year -> t
-              val ash : year -> t
-              val palm : year -> t
-              val easter_friday : year -> t
-              val easter_saturday : year -> t
-              val easter_monday : year -> t
-              val ascension : year -> t
-              val withsunday : year -> t
-              val withmonday : year -> t
-              val corpus_christi : year -> t
-            end
-          module Time :
-            sig
-              type t = T.t
-              type field = [ `Hour | `Minute | `Second ]
-              type second = T.second
-              module Second :
-                sig
-                  type t = second
-                  val from_int : int -> t
-                  val from_float : float -> t
-                  val to_int : t -> int
-                  val to_float : t -> float
-                end
-              val make : int -> int -> second -> t
-              val lmake :
-                ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-              val now : unit -> t
-              val midnight : unit -> t
-              val midday : unit -> t
-              val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-              val from_gmt : t -> t
-              val to_gmt : t -> t
-              val normalize : t -> t * int
-              val hour : t -> int
-              val minute : t -> int
-              val second : t -> second
-              val to_seconds : t -> second
-              val to_minutes : t -> float
-              val to_hours : t -> float
-              val equal : t -> t -> bool
-              val compare : t -> t -> int
-              val hash : t -> int
-              val is_pm : t -> bool
-              val is_am : t -> bool
-              val from_seconds : second -> t
-              val from_minutes : float -> t
-              val from_hours : float -> t
-              module Period :
-                sig
-                  type +'a period = 'T.Period.period
-                    constraint 'a = [< Period.date_field ]
-                  type t = Period.date_field period
-                  val empty : [< Period.date_field ] period
-                  val add :
-                    ([< Period.date_field ] as 'a) period ->
-                    'a period -> 'a period
-                  val sub :
-                    ([< Period.date_field ] as 'a) period ->
-                    'a period -> 'a period
-                  val opp :
-                    ([< Period.date_field ] as 'a) period -> 'a period
-                  val equal :
-                    [< Period.date_field ] period ->
-                    [< Period.date_field ] period -> bool
-                  val compare :
-                    [< Period.date_field ] period ->
-                    [< Period.date_field ] period -> int
-                  val hash : [< Period.date_field ] period -> int
-                  val length : [< Period.date_field ] period -> second
-                  val mul :
-                    ([< Period.date_field ] as 'a) period ->
-                    'a period -> 'a period
-                  val div :
-                    ([< Period.date_field ] as 'a) period ->
-                    'a period -> 'a period
-                  val make :
-                    int -> int -> second -> [< Period.date_field ] period
-                  val lmake :
-                    ?hour:int ->
-                    ?minute:int ->
-                    ?second:second -> unit -> [< Period.date_field ] period
-                  val hour : int -> [< Period.date_field ] period
-                  val minute : int -> [< Period.date_field ] period
-                  val second : second -> [< Period.date_field ] period
-                  val to_seconds : [< Period.date_field ] period -> second
-                  val to_minutes : [< Period.date_field ] period -> float
-                  val to_hours : [< Period.date_field ] period -> float
-                end
-              val add : t -> [< Period.date_field ] Period.period -> t
-              val sub : t -> t -> [< Period.date_field ] Period.period
-              val rem : t -> [< Period.date_field ] Period.period -> t
-              val next : t -> field -> t
-              val prev : t -> field -> t
-            end
-          type t
-          type day = Date.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-          type month =
-            Date.month =
-              Jan
-            | Feb
-            | Mar
-            | Apr
-            | May
-            | Jun
-            | Jul
-            | Aug
-            | Sep
-            | Oct
-            | Nov
-            | Dec
-          type year = Date.year
-          type second = Time.second
-          type field =
-              [ `Day | `Hour | `Minute | `Month | `Second | `Week | `Year ]
-          val make : int -> int -> int -> int -> int -> second -> t
-          val lmake :
-            year:int ->
-            ?month:int ->
-            ?day:int ->
-            ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-          val create : Date.t -> Time.t -> t
-          val now : unit -> t
-          val from_jd : float -> t
-          val from_mjd : float -> t
-          val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-          val to_gmt : t -> t
-          val from_gmt : t -> t
-          val days_in_month : t -> int
-          val day_of_week : t -> day
-          val day_of_month : t -> int
-          val day_of_year : t -> int
-          val week : t -> int
-          val month : t -> month
-          val year : t -> int
-          val to_jd : t -> float
-          val to_mjd : t -> float
-          val hour : t -> int
-          val minute : t -> int
-          val second : t -> second
-          val equal : t -> t -> bool
-          val compare : t -> t -> int
-          val hash : t -> int
-          val is_leap_day : t -> bool
-          val is_gregorian : t -> bool
-          val is_julian : t -> bool
-          val is_pm : t -> bool
-          val is_am : t -> bool
-          val to_unixtm : t -> Unix.tm
-          val from_unixtm : Unix.tm -> t
-          val to_unixfloat : t -> float
-          val from_unixfloat : float -> t
-          val from_date : Date.t -> t
-          val to_date : t -> Date.t
-          val to_time : t -> Time.t
-          module Period :
-            sig
-              type +'a period constraint 'a = [< Period.date_field ]
-              type t = Period.date_field period
-              val empty : [< Period.date_field ] period
-              val add :
-                ([< Period.date_field > `Day `Week ] as 'a) period ->
-                'a period -> 'a period
-              val sub :
-                ([< Period.date_field > `Day `Week ] as 'a) period ->
-                'a period -> 'a period
-              val opp :
-                ([< Period.date_field > `Day `Week ] as 'a) period ->
-                'a period
-              val equal :
-                [< Period.date_field ] period ->
-                [< Period.date_field ] period -> bool
-              val compare :
-                [< Period.date_field ] period ->
-                [< Period.date_field ] period -> int
-              val hash : [< Period.date_field ] period -> int
-              val make : int -> int -> int -> int -> int -> second -> t
-              val lmake :
-                ?year:int ->
-                ?month:int ->
-                ?day:int ->
-                ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-              val year : int -> [< Period.date_field > `Year ] period
-              val month : int -> [< Period.date_field > `Month `Year ] period
-              val week : int -> [< Period.date_field > `Day `Week ] period
-              val day : int -> [< Period.date_field > `Day `Week ] period
-              val hour : int -> [< Period.date_field > `Day `Week ] period
-              val minute : int -> [< Period.date_field > `Day `Week ] period
-              val second :
-                second -> [< Period.date_field > `Day `Week ] period
-              val from_date :
-                ([< Period.date_field ] as 'a) Date.Period.period ->
-                'a period
-              val from_time :
-                ([< Period.date_field ] as 'a) Time.Period.period ->
-                'a period
-              val to_date :
-                ([< Date.field ] as 'a) period -> 'Date.Period.period
-              exception Not_computable
-              val to_time :
-                ([< Period.date_field ] as 'a) period ->
-                'Time.Period.period
-              val safe_to_time :
-                ([< `Day | `Week ] as 'a) period -> 'Time.Period.period
-              val ymds :
-                [< Period.date_field ] period -> int * int * int * second
-            end
-          val add : t -> [< Period.date_field ] Period.period -> t
-          val sub :
-            t -> t -> [< Period.date_field > `Day `Week ] Period.period
-          val precise_sub : t -> t -> Period.t
-          val rem : t -> [< Period.date_field ] Period.period -> t
-          val next : t -> field -> t
-          val prev : t -> field -> t
-        end
-  module Make_Precise :
-    functor (D : Date_sig.S->
-      functor (T : Time_sig.S->
-        sig
-          module Date :
-            sig
-              type field = Period.date_field
-              type -'a date = 'D.date constraint 'a = [< field ]
-              type t = field date
-              type day = D.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-              type month =
-                D.month =
-                  Jan
-                | Feb
-                | Mar
-                | Apr
-                | May
-                | Jun
-                | Jul
-                | Aug
-                | Sep
-                | Oct
-                | Nov
-                | Dec
-              type year = int
-              exception Out_of_bounds
-              exception Undefined
-              val make : year -> int -> int -> t
-              val lmake : year:year -> ?month:int -> ?day:int -> unit -> t
-              val make_year : int -> [< `Year ] date
-              val make_year_month : int -> int -> [< `Month | `Year ] date
-              val today : unit -> t
-              val from_jd : int -> t
-              val from_mjd : int -> t
-              val from_day_of_year : year -> int -> t
-              val days_in_month : [< field > `Month `Year ] date -> int
-              val day_of_week : t -> day
-              val day_of_month : t -> int
-              val day_of_year : t -> int
-              val week : t -> int
-              val month : [< field > `Month ] date -> month
-              val year : [< field > `Year ] date -> year
-              val to_jd : t -> int
-              val to_mjd : t -> int
-              val equal : [< field ] date -> [< field ] date -> bool
-              val compare : [< field ] date -> [< field ] date -> int
-              val hash : [< field ] date -> int
-              val is_valid_date : year -> int -> int -> bool
-              val is_leap_day : t -> bool
-              val is_gregorian : t -> bool
-              val is_julian : t -> bool
-              val to_unixtm : t -> Unix.tm
-              val from_unixtm : Unix.tm -> t
-              val to_unixfloat : t -> float
-              val from_unixfloat : float -> t
-              val to_business : t -> year * int * day
-              val from_business : year -> int -> day -> t
-              val int_of_day : day -> int
-              val day_of_int : int -> day
-              val int_of_month : month -> int
-              val month_of_int : int -> month
-              module Period :
-                sig
-                  type +'a p = 'D.Period.p constraint 'a = [< field ]
-                  type +'a period = 'a p constraint 'a = [< field ]
-                  type t = Period.date_field period
-                  val empty : [< Period.date_field ] period
-                  val add :
-                    ([< Period.date_field ] as 'a) period ->
-                    'a period -> 'a period
-                  val sub :
-                    ([< Period.date_field ] as 'a) period ->
-                    'a period -> 'a period
-                  val opp :
-                    ([< Period.date_field ] as 'a) period -> 'a period
-                  val equal :
-                    [< Period.date_field ] period ->
-                    [< Period.date_field ] period -> bool
-                  val compare :
-                    [< Period.date_field ] period ->
-                    [< Period.date_field ] period -> int
-                  val hash : [< Period.date_field ] period -> int
-                  val make : int -> int -> int -> t
-                  val lmake :
-                    ?year:int -> ?month:int -> ?day:int -> unit -> t
-                  val year : int -> [< field > `Year ] period
-                  val month : int -> [< field > `Month `Year ] period
-                  val week : int -> [< field > `Day `Week ] period
-                  val day : int -> [< field > `Day `Week ] period
-                  exception Not_computable
-                  val nb_days : [< field ] period -> int
-                  val safe_nb_days : [< `Day | `Week ] period -> int
-                  val ymd : [< field ] period -> int * int * int
-                end
-              val add :
-                ([< field ] as 'a) date -> 'Period.period -> 'a date
-              val sub :
-                ([< field ] as 'a) date ->
-                'a date -> [< field > `Day `Week ] Period.period
-              val precise_sub :
-                ([< field ] as 'a) date -> 'a date -> Period.t
-              val rem :
-                ([< field ] as 'a) date -> 'Period.period -> 'a date
-              val next : ([< field ] as 'a) date -> '-> 'a date
-              val prev : ([< field ] as 'a) date -> '-> 'a date
-              val is_leap_year : year -> bool
-              val same_calendar : year -> year -> bool
-              val days_in_year : ?month:month -> year -> int
-              val weeks_in_year : year -> int
-              val week_first_last : int -> year -> t * t
-              val nth_weekday_of_month : year -> month -> day -> int -> t
-              val century : year -> int
-              val millenium : year -> int
-              val solar_number : year -> int
-              val indiction : year -> int
-              val golden_number : year -> int
-              val epact : year -> int
-              val easter : year -> t
-              val carnaval : year -> t
-              val mardi_gras : year -> t
-              val ash : year -> t
-              val palm : year -> t
-              val easter_friday : year -> t
-              val easter_saturday : year -> t
-              val easter_monday : year -> t
-              val ascension : year -> t
-              val withsunday : year -> t
-              val withmonday : year -> t
-              val corpus_christi : year -> t
-            end
-          module Time :
-            sig
-              type t = T.t
-              type field = [ `Hour | `Minute | `Second ]
-              type second = T.second
-              module Second :
-                sig
-                  type t = second
-                  val from_int : int -> t
-                  val from_float : float -> t
-                  val to_int : t -> int
-                  val to_float : t -> float
-                end
-              val make : int -> int -> second -> t
-              val lmake :
-                ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-              val now : unit -> t
-              val midnight : unit -> t
-              val midday : unit -> t
-              val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-              val from_gmt : t -> t
-              val to_gmt : t -> t
-              val normalize : t -> t * int
-              val hour : t -> int
-              val minute : t -> int
-              val second : t -> second
-              val to_seconds : t -> second
-              val to_minutes : t -> float
-              val to_hours : t -> float
-              val equal : t -> t -> bool
-              val compare : t -> t -> int
-              val hash : t -> int
-              val is_pm : t -> bool
-              val is_am : t -> bool
-              val from_seconds : second -> t
-              val from_minutes : float -> t
-              val from_hours : float -> t
-              module Period :
-                sig
-                  type +'a period = 'T.Period.period
-                    constraint 'a = [< Period.date_field ]
-                  type t = Period.date_field period
-                  val empty : [< Period.date_field ] period
-                  val add :
-                    ([< Period.date_field ] as 'a) period ->
-                    'a period -> 'a period
-                  val sub :
-                    ([< Period.date_field ] as 'a) period ->
-                    'a period -> 'a period
-                  val opp :
-                    ([< Period.date_field ] as 'a) period -> 'a period
-                  val equal :
-                    [< Period.date_field ] period ->
-                    [< Period.date_field ] period -> bool
-                  val compare :
-                    [< Period.date_field ] period ->
-                    [< Period.date_field ] period -> int
-                  val hash : [< Period.date_field ] period -> int
-                  val length : [< Period.date_field ] period -> second
-                  val mul :
-                    ([< Period.date_field ] as 'a) period ->
-                    'a period -> 'a period
-                  val div :
-                    ([< Period.date_field ] as 'a) period ->
-                    'a period -> 'a period
-                  val make :
-                    int -> int -> second -> [< Period.date_field ] period
-                  val lmake :
-                    ?hour:int ->
-                    ?minute:int ->
-                    ?second:second -> unit -> [< Period.date_field ] period
-                  val hour : int -> [< Period.date_field ] period
-                  val minute : int -> [< Period.date_field ] period
-                  val second : second -> [< Period.date_field ] period
-                  val to_seconds : [< Period.date_field ] period -> second
-                  val to_minutes : [< Period.date_field ] period -> float
-                  val to_hours : [< Period.date_field ] period -> float
-                end
-              val add : t -> [< Period.date_field ] Period.period -> t
-              val sub : t -> t -> [< Period.date_field ] Period.period
-              val rem : t -> [< Period.date_field ] Period.period -> t
-              val next : t -> field -> t
-              val prev : t -> field -> t
-            end
-          type t
-          type day = Date.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-          type month =
-            Date.month =
-              Jan
-            | Feb
-            | Mar
-            | Apr
-            | May
-            | Jun
-            | Jul
-            | Aug
-            | Sep
-            | Oct
-            | Nov
-            | Dec
-          type year = Date.year
-          type second = Time.second
-          type field =
-              [ `Day | `Hour | `Minute | `Month | `Second | `Week | `Year ]
-          val make : int -> int -> int -> int -> int -> second -> t
-          val lmake :
-            year:int ->
-            ?month:int ->
-            ?day:int ->
-            ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-          val create : Date.t -> Time.t -> t
-          val now : unit -> t
-          val from_jd : float -> t
-          val from_mjd : float -> t
-          val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-          val to_gmt : t -> t
-          val from_gmt : t -> t
-          val days_in_month : t -> int
-          val day_of_week : t -> day
-          val day_of_month : t -> int
-          val day_of_year : t -> int
-          val week : t -> int
-          val month : t -> month
-          val year : t -> int
-          val to_jd : t -> float
-          val to_mjd : t -> float
-          val hour : t -> int
-          val minute : t -> int
-          val second : t -> second
-          val equal : t -> t -> bool
-          val compare : t -> t -> int
-          val hash : t -> int
-          val is_leap_day : t -> bool
-          val is_gregorian : t -> bool
-          val is_julian : t -> bool
-          val is_pm : t -> bool
-          val is_am : t -> bool
-          val to_unixtm : t -> Unix.tm
-          val from_unixtm : Unix.tm -> t
-          val to_unixfloat : t -> float
-          val from_unixfloat : float -> t
-          val from_date : Date.t -> t
-          val to_date : t -> Date.t
-          val to_time : t -> Time.t
-          module Period :
-            sig
-              type +'a period constraint 'a = [< Period.date_field ]
-              type t = Period.date_field period
-              val empty : [< Period.date_field ] period
-              val add :
-                ([< Period.date_field > `Day `Week ] as 'a) period ->
-                'a period -> 'a period
-              val sub :
-                ([< Period.date_field > `Day `Week ] as 'a) period ->
-                'a period -> 'a period
-              val opp :
-                ([< Period.date_field > `Day `Week ] as 'a) period ->
-                'a period
-              val equal :
-                [< Period.date_field ] period ->
-                [< Period.date_field ] period -> bool
-              val compare :
-                [< Period.date_field ] period ->
-                [< Period.date_field ] period -> int
-              val hash : [< Period.date_field ] period -> int
-              val make : int -> int -> int -> int -> int -> second -> t
-              val lmake :
-                ?year:int ->
-                ?month:int ->
-                ?day:int ->
-                ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-              val year : int -> [< Period.date_field > `Year ] period
-              val month : int -> [< Period.date_field > `Month `Year ] period
-              val week : int -> [< Period.date_field > `Day `Week ] period
-              val day : int -> [< Period.date_field > `Day `Week ] period
-              val hour : int -> [< Period.date_field > `Day `Week ] period
-              val minute : int -> [< Period.date_field > `Day `Week ] period
-              val second :
-                second -> [< Period.date_field > `Day `Week ] period
-              val from_date :
-                ([< Period.date_field ] as 'a) Date.Period.period ->
-                'a period
-              val from_time :
-                ([< Period.date_field ] as 'a) Time.Period.period ->
-                'a period
-              val to_date :
-                ([< Date.field ] as 'a) period -> 'Date.Period.period
-              exception Not_computable
-              val to_time :
-                ([< Period.date_field ] as 'a) period ->
-                'Time.Period.period
-              val safe_to_time :
-                ([< `Day | `Week ] as 'a) period -> 'Time.Period.period
-              val ymds :
-                [< Period.date_field ] period -> int * int * int * second
-            end
-          val add : t -> [< Period.date_field ] Period.period -> t
-          val sub :
-            t -> t -> [< Period.date_field > `Day `Week ] Period.period
-          val precise_sub : t -> t -> Period.t
-          val rem : t -> [< Period.date_field ] Period.period -> t
-          val next : t -> field -> t
-          val prev : t -> field -> t
-        end
-end
\ No newline at end of file diff --git a/doc/type_Calendar_sig.S.Date.html b/doc/type_Calendar_sig.S.Date.html deleted file mode 100644 index 2f1e0fc..0000000 --- a/doc/type_Calendar_sig.S.Date.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Calendar_sig.S.Date - - -Date_sig.S \ No newline at end of file diff --git a/doc/type_Calendar_sig.S.Period.html b/doc/type_Calendar_sig.S.Period.html deleted file mode 100644 index 34ec8b5..0000000 --- a/doc/type_Calendar_sig.S.Period.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Calendar_sig.S.Period - - -sig
-  type +'a period constraint 'a = [< Period.date_field ]
-  type t = Period.date_field Calendar_sig.S.Period.period
-  val empty : [< Period.date_field ] Calendar_sig.S.Period.period
-  val add :
-    ([< Period.date_field > `Day `Week ] as 'a) Calendar_sig.S.Period.period ->
-    'Calendar_sig.S.Period.period -> 'Calendar_sig.S.Period.period
-  val sub :
-    ([< Period.date_field > `Day `Week ] as 'a) Calendar_sig.S.Period.period ->
-    'Calendar_sig.S.Period.period -> 'Calendar_sig.S.Period.period
-  val opp :
-    ([< Period.date_field > `Day `Week ] as 'a) Calendar_sig.S.Period.period ->
-    'Calendar_sig.S.Period.period
-  val equal :
-    [< Period.date_field ] Calendar_sig.S.Period.period ->
-    [< Period.date_field ] Calendar_sig.S.Period.period -> bool
-  val compare :
-    [< Period.date_field ] Calendar_sig.S.Period.period ->
-    [< Period.date_field ] Calendar_sig.S.Period.period -> int
-  val hash : [< Period.date_field ] Calendar_sig.S.Period.period -> int
-  val make :
-    int ->
-    int ->
-    int -> int -> int -> Calendar_sig.S.second -> Calendar_sig.S.Period.t
-  val lmake :
-    ?year:int ->
-    ?month:int ->
-    ?day:int ->
-    ?hour:int ->
-    ?minute:int ->
-    ?second:Calendar_sig.S.second -> unit -> Calendar_sig.S.Period.t
-  val year :
-    int -> [< Period.date_field > `Year ] Calendar_sig.S.Period.period
-  val month :
-    int -> [< Period.date_field > `Month `Year ] Calendar_sig.S.Period.period
-  val week :
-    int -> [< Period.date_field > `Day `Week ] Calendar_sig.S.Period.period
-  val day :
-    int -> [< Period.date_field > `Day `Week ] Calendar_sig.S.Period.period
-  val hour :
-    int -> [< Period.date_field > `Day `Week ] Calendar_sig.S.Period.period
-  val minute :
-    int -> [< Period.date_field > `Day `Week ] Calendar_sig.S.Period.period
-  val second :
-    Calendar_sig.S.second ->
-    [< Period.date_field > `Day `Week ] Calendar_sig.S.Period.period
-  val from_date :
-    ([< Period.date_field ] as 'a) Date.Period.period ->
-    'Calendar_sig.S.Period.period
-  val from_time :
-    ([< Period.date_field ] as 'a) Time.Period.period ->
-    'Calendar_sig.S.Period.period
-  val to_date :
-    ([< Date.field ] as 'a) Calendar_sig.S.Period.period ->
-    'Date.Period.period
-  exception Not_computable
-  val to_time :
-    ([< Period.date_field ] as 'a) Calendar_sig.S.Period.period ->
-    'Time.Period.period
-  val safe_to_time :
-    ([< `Day | `Week ] as 'a) Calendar_sig.S.Period.period ->
-    'Time.Period.period
-  val ymds :
-    [< Period.date_field ] Calendar_sig.S.Period.period ->
-    int * int * int * Calendar_sig.S.second
-end
\ No newline at end of file diff --git a/doc/type_Calendar_sig.S.Time.html b/doc/type_Calendar_sig.S.Time.html deleted file mode 100644 index 0bf4f31..0000000 --- a/doc/type_Calendar_sig.S.Time.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Calendar_sig.S.Time - - -Time_sig.S \ No newline at end of file diff --git a/doc/type_Calendar_sig.S.html b/doc/type_Calendar_sig.S.html deleted file mode 100644 index bb55fe2..0000000 --- a/doc/type_Calendar_sig.S.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Calendar_sig.S - - -sig
-  module Date : Date_sig.S
-  module Time : Time_sig.S
-  type t
-  type day = Date.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-  type month =
-    Date.month =
-      Jan
-    | Feb
-    | Mar
-    | Apr
-    | May
-    | Jun
-    | Jul
-    | Aug
-    | Sep
-    | Oct
-    | Nov
-    | Dec
-  type year = Date.year
-  type second = Time.second
-  type field = [ `Day | `Hour | `Minute | `Month | `Second | `Week | `Year ]
-  val make :
-    int ->
-    int -> int -> int -> int -> Calendar_sig.S.second -> Calendar_sig.S.t
-  val lmake :
-    year:int ->
-    ?month:int ->
-    ?day:int ->
-    ?hour:int ->
-    ?minute:int -> ?second:Calendar_sig.S.second -> unit -> Calendar_sig.S.t
-  val create : Date.t -> Time.t -> Calendar_sig.S.t
-  val now : unit -> Calendar_sig.S.t
-  val from_jd : float -> Calendar_sig.S.t
-  val from_mjd : float -> Calendar_sig.S.t
-  val convert :
-    Calendar_sig.S.t -> Time_Zone.t -> Time_Zone.t -> Calendar_sig.S.t
-  val to_gmt : Calendar_sig.S.t -> Calendar_sig.S.t
-  val from_gmt : Calendar_sig.S.t -> Calendar_sig.S.t
-  val days_in_month : Calendar_sig.S.t -> int
-  val day_of_week : Calendar_sig.S.t -> Calendar_sig.S.day
-  val day_of_month : Calendar_sig.S.t -> int
-  val day_of_year : Calendar_sig.S.t -> int
-  val week : Calendar_sig.S.t -> int
-  val month : Calendar_sig.S.t -> Calendar_sig.S.month
-  val year : Calendar_sig.S.t -> int
-  val to_jd : Calendar_sig.S.t -> float
-  val to_mjd : Calendar_sig.S.t -> float
-  val hour : Calendar_sig.S.t -> int
-  val minute : Calendar_sig.S.t -> int
-  val second : Calendar_sig.S.t -> Calendar_sig.S.second
-  val equal : Calendar_sig.S.t -> Calendar_sig.S.t -> bool
-  val compare : Calendar_sig.S.t -> Calendar_sig.S.t -> int
-  val hash : Calendar_sig.S.t -> int
-  val is_leap_day : Calendar_sig.S.t -> bool
-  val is_gregorian : Calendar_sig.S.t -> bool
-  val is_julian : Calendar_sig.S.t -> bool
-  val is_pm : Calendar_sig.S.t -> bool
-  val is_am : Calendar_sig.S.t -> bool
-  val to_unixtm : Calendar_sig.S.t -> Unix.tm
-  val from_unixtm : Unix.tm -> Calendar_sig.S.t
-  val to_unixfloat : Calendar_sig.S.t -> float
-  val from_unixfloat : float -> Calendar_sig.S.t
-  val from_date : Date.t -> Calendar_sig.S.t
-  val to_date : Calendar_sig.S.t -> Date.t
-  val to_time : Calendar_sig.S.t -> Time.t
-  module Period :
-    sig
-      type +'a period constraint 'a = [< Period.date_field ]
-      type t = Period.date_field Calendar_sig.S.Period.period
-      val empty : [< Period.date_field ] Calendar_sig.S.Period.period
-      val add :
-        ([< Period.date_field > `Day `Week ] as 'a)
-        Calendar_sig.S.Period.period ->
-        'Calendar_sig.S.Period.period -> 'Calendar_sig.S.Period.period
-      val sub :
-        ([< Period.date_field > `Day `Week ] as 'a)
-        Calendar_sig.S.Period.period ->
-        'Calendar_sig.S.Period.period -> 'Calendar_sig.S.Period.period
-      val opp :
-        ([< Period.date_field > `Day `Week ] as 'a)
-        Calendar_sig.S.Period.period -> 'Calendar_sig.S.Period.period
-      val equal :
-        [< Period.date_field ] Calendar_sig.S.Period.period ->
-        [< Period.date_field ] Calendar_sig.S.Period.period -> bool
-      val compare :
-        [< Period.date_field ] Calendar_sig.S.Period.period ->
-        [< Period.date_field ] Calendar_sig.S.Period.period -> int
-      val hash : [< Period.date_field ] Calendar_sig.S.Period.period -> int
-      val make :
-        int ->
-        int ->
-        int -> int -> int -> Calendar_sig.S.second -> Calendar_sig.S.Period.t
-      val lmake :
-        ?year:int ->
-        ?month:int ->
-        ?day:int ->
-        ?hour:int ->
-        ?minute:int ->
-        ?second:Calendar_sig.S.second -> unit -> Calendar_sig.S.Period.t
-      val year :
-        int -> [< Period.date_field > `Year ] Calendar_sig.S.Period.period
-      val month :
-        int ->
-        [< Period.date_field > `Month `Year ] Calendar_sig.S.Period.period
-      val week :
-        int ->
-        [< Period.date_field > `Day `Week ] Calendar_sig.S.Period.period
-      val day :
-        int ->
-        [< Period.date_field > `Day `Week ] Calendar_sig.S.Period.period
-      val hour :
-        int ->
-        [< Period.date_field > `Day `Week ] Calendar_sig.S.Period.period
-      val minute :
-        int ->
-        [< Period.date_field > `Day `Week ] Calendar_sig.S.Period.period
-      val second :
-        Calendar_sig.S.second ->
-        [< Period.date_field > `Day `Week ] Calendar_sig.S.Period.period
-      val from_date :
-        ([< Period.date_field ] as 'a) Date.Period.period ->
-        'Calendar_sig.S.Period.period
-      val from_time :
-        ([< Period.date_field ] as 'a) Time.Period.period ->
-        'Calendar_sig.S.Period.period
-      val to_date :
-        ([< Date.field ] as 'a) Calendar_sig.S.Period.period ->
-        'Date.Period.period
-      exception Not_computable
-      val to_time :
-        ([< Period.date_field ] as 'a) Calendar_sig.S.Period.period ->
-        'Time.Period.period
-      val safe_to_time :
-        ([< `Day | `Week ] as 'a) Calendar_sig.S.Period.period ->
-        'Time.Period.period
-      val ymds :
-        [< Period.date_field ] Calendar_sig.S.Period.period ->
-        int * int * int * Calendar_sig.S.second
-    end
-  val add :
-    Calendar_sig.S.t ->
-    [< Period.date_field ] Calendar_sig.S.Period.period -> Calendar_sig.S.t
-  val sub :
-    Calendar_sig.S.t ->
-    Calendar_sig.S.t ->
-    [< Period.date_field > `Day `Week ] Calendar_sig.S.Period.period
-  val precise_sub :
-    Calendar_sig.S.t -> Calendar_sig.S.t -> Calendar_sig.S.Period.t
-  val rem :
-    Calendar_sig.S.t ->
-    [< Period.date_field ] Calendar_sig.S.Period.period -> Calendar_sig.S.t
-  val next : Calendar_sig.S.t -> Calendar_sig.S.field -> Calendar_sig.S.t
-  val prev : Calendar_sig.S.t -> Calendar_sig.S.field -> Calendar_sig.S.t
-end
\ No newline at end of file diff --git a/doc/type_Calendar_sig.html b/doc/type_Calendar_sig.html deleted file mode 100644 index 775d74f..0000000 --- a/doc/type_Calendar_sig.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Calendar_sig - - -sig
-  module type S =
-    sig
-      module Date : Date_sig.S
-      module Time : Time_sig.S
-      type t
-      type day = Date.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-      type month =
-        Date.month =
-          Jan
-        | Feb
-        | Mar
-        | Apr
-        | May
-        | Jun
-        | Jul
-        | Aug
-        | Sep
-        | Oct
-        | Nov
-        | Dec
-      type year = Date.year
-      type second = Time.second
-      type field =
-          [ `Day | `Hour | `Minute | `Month | `Second | `Week | `Year ]
-      val make :
-        int ->
-        int -> int -> int -> int -> Calendar_sig.S.second -> Calendar_sig.S.t
-      val lmake :
-        year:int ->
-        ?month:int ->
-        ?day:int ->
-        ?hour:int ->
-        ?minute:int ->
-        ?second:Calendar_sig.S.second -> unit -> Calendar_sig.S.t
-      val create : Date.t -> Time.t -> Calendar_sig.S.t
-      val now : unit -> Calendar_sig.S.t
-      val from_jd : float -> Calendar_sig.S.t
-      val from_mjd : float -> Calendar_sig.S.t
-      val convert :
-        Calendar_sig.S.t -> Time_Zone.t -> Time_Zone.t -> Calendar_sig.S.t
-      val to_gmt : Calendar_sig.S.t -> Calendar_sig.S.t
-      val from_gmt : Calendar_sig.S.t -> Calendar_sig.S.t
-      val days_in_month : Calendar_sig.S.t -> int
-      val day_of_week : Calendar_sig.S.t -> Calendar_sig.S.day
-      val day_of_month : Calendar_sig.S.t -> int
-      val day_of_year : Calendar_sig.S.t -> int
-      val week : Calendar_sig.S.t -> int
-      val month : Calendar_sig.S.t -> Calendar_sig.S.month
-      val year : Calendar_sig.S.t -> int
-      val to_jd : Calendar_sig.S.t -> float
-      val to_mjd : Calendar_sig.S.t -> float
-      val hour : Calendar_sig.S.t -> int
-      val minute : Calendar_sig.S.t -> int
-      val second : Calendar_sig.S.t -> Calendar_sig.S.second
-      val equal : Calendar_sig.S.t -> Calendar_sig.S.t -> bool
-      val compare : Calendar_sig.S.t -> Calendar_sig.S.t -> int
-      val hash : Calendar_sig.S.t -> int
-      val is_leap_day : Calendar_sig.S.t -> bool
-      val is_gregorian : Calendar_sig.S.t -> bool
-      val is_julian : Calendar_sig.S.t -> bool
-      val is_pm : Calendar_sig.S.t -> bool
-      val is_am : Calendar_sig.S.t -> bool
-      val to_unixtm : Calendar_sig.S.t -> Unix.tm
-      val from_unixtm : Unix.tm -> Calendar_sig.S.t
-      val to_unixfloat : Calendar_sig.S.t -> float
-      val from_unixfloat : float -> Calendar_sig.S.t
-      val from_date : Date.t -> Calendar_sig.S.t
-      val to_date : Calendar_sig.S.t -> Date.t
-      val to_time : Calendar_sig.S.t -> Time.t
-      module Period :
-        sig
-          type +'a period constraint 'a = [< Period.date_field ]
-          type t = Period.date_field Calendar_sig.S.Period.period
-          val empty : [< Period.date_field ] Calendar_sig.S.Period.period
-          val add :
-            ([< Period.date_field > `Day `Week ] as 'a)
-            Calendar_sig.S.Period.period ->
-            'Calendar_sig.S.Period.period ->
-            'Calendar_sig.S.Period.period
-          val sub :
-            ([< Period.date_field > `Day `Week ] as 'a)
-            Calendar_sig.S.Period.period ->
-            'Calendar_sig.S.Period.period ->
-            'Calendar_sig.S.Period.period
-          val opp :
-            ([< Period.date_field > `Day `Week ] as 'a)
-            Calendar_sig.S.Period.period -> 'Calendar_sig.S.Period.period
-          val equal :
-            [< Period.date_field ] Calendar_sig.S.Period.period ->
-            [< Period.date_field ] Calendar_sig.S.Period.period -> bool
-          val compare :
-            [< Period.date_field ] Calendar_sig.S.Period.period ->
-            [< Period.date_field ] Calendar_sig.S.Period.period -> int
-          val hash :
-            [< Period.date_field ] Calendar_sig.S.Period.period -> int
-          val make :
-            int ->
-            int ->
-            int ->
-            int -> int -> Calendar_sig.S.second -> Calendar_sig.S.Period.t
-          val lmake :
-            ?year:int ->
-            ?month:int ->
-            ?day:int ->
-            ?hour:int ->
-            ?minute:int ->
-            ?second:Calendar_sig.S.second -> unit -> Calendar_sig.S.Period.t
-          val year :
-            int ->
-            [< Period.date_field > `Year ] Calendar_sig.S.Period.period
-          val month :
-            int ->
-            [< Period.date_field > `Month `Year ]
-            Calendar_sig.S.Period.period
-          val week :
-            int ->
-            [< Period.date_field > `Day `Week ] Calendar_sig.S.Period.period
-          val day :
-            int ->
-            [< Period.date_field > `Day `Week ] Calendar_sig.S.Period.period
-          val hour :
-            int ->
-            [< Period.date_field > `Day `Week ] Calendar_sig.S.Period.period
-          val minute :
-            int ->
-            [< Period.date_field > `Day `Week ] Calendar_sig.S.Period.period
-          val second :
-            Calendar_sig.S.second ->
-            [< Period.date_field > `Day `Week ] Calendar_sig.S.Period.period
-          val from_date :
-            ([< Period.date_field ] as 'a) Date.Period.period ->
-            'Calendar_sig.S.Period.period
-          val from_time :
-            ([< Period.date_field ] as 'a) Time.Period.period ->
-            'Calendar_sig.S.Period.period
-          val to_date :
-            ([< Date.field ] as 'a) Calendar_sig.S.Period.period ->
-            'Date.Period.period
-          exception Not_computable
-          val to_time :
-            ([< Period.date_field ] as 'a) Calendar_sig.S.Period.period ->
-            'Time.Period.period
-          val safe_to_time :
-            ([< `Day | `Week ] as 'a) Calendar_sig.S.Period.period ->
-            'Time.Period.period
-          val ymds :
-            [< Period.date_field ] Calendar_sig.S.Period.period ->
-            int * int * int * Calendar_sig.S.second
-        end
-      val add :
-        Calendar_sig.S.t ->
-        [< Period.date_field ] Calendar_sig.S.Period.period ->
-        Calendar_sig.S.t
-      val sub :
-        Calendar_sig.S.t ->
-        Calendar_sig.S.t ->
-        [< Period.date_field > `Day `Week ] Calendar_sig.S.Period.period
-      val precise_sub :
-        Calendar_sig.S.t -> Calendar_sig.S.t -> Calendar_sig.S.Period.t
-      val rem :
-        Calendar_sig.S.t ->
-        [< Period.date_field ] Calendar_sig.S.Period.period ->
-        Calendar_sig.S.t
-      val next : Calendar_sig.S.t -> Calendar_sig.S.field -> Calendar_sig.S.t
-      val prev : Calendar_sig.S.t -> Calendar_sig.S.field -> Calendar_sig.S.t
-    end
-end
\ No newline at end of file diff --git a/doc/type_Date.html b/doc/type_Date.html deleted file mode 100644 index dfc932f..0000000 --- a/doc/type_Date.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Date - - -sig
-  type field = Period.date_field
-  type -'a date constraint 'a = [< field ]
-  type t = field date
-  type day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-  type month =
-      Jan
-    | Feb
-    | Mar
-    | Apr
-    | May
-    | Jun
-    | Jul
-    | Aug
-    | Sep
-    | Oct
-    | Nov
-    | Dec
-  type year = int
-  exception Out_of_bounds
-  exception Undefined
-  val make : year -> int -> int -> t
-  val lmake : year:year -> ?month:int -> ?day:int -> unit -> t
-  val make_year : int -> [< `Year ] date
-  val make_year_month : int -> int -> [< `Month | `Year ] date
-  val today : unit -> t
-  val from_jd : int -> t
-  val from_mjd : int -> t
-  val from_day_of_year : year -> int -> t
-  val days_in_month : [< field > `Month `Year ] date -> int
-  val day_of_week : t -> day
-  val day_of_month : t -> int
-  val day_of_year : t -> int
-  val week : t -> int
-  val month : [< field > `Month ] date -> month
-  val year : [< field > `Year ] date -> year
-  val to_jd : t -> int
-  val to_mjd : t -> int
-  val equal : [< field ] date -> [< field ] date -> bool
-  val compare : [< field ] date -> [< field ] date -> int
-  val hash : [< field ] date -> int
-  val is_valid_date : year -> int -> int -> bool
-  val is_leap_day : t -> bool
-  val is_gregorian : t -> bool
-  val is_julian : t -> bool
-  val to_unixtm : t -> Unix.tm
-  val from_unixtm : Unix.tm -> t
-  val to_unixfloat : t -> float
-  val from_unixfloat : float -> t
-  val to_business : t -> year * int * day
-  val from_business : year -> int -> day -> t
-  val int_of_day : day -> int
-  val day_of_int : int -> day
-  val int_of_month : month -> int
-  val month_of_int : int -> month
-  module Period :
-    sig
-      type +'a p constraint 'a = [< field ]
-      type +'a period = 'a p constraint 'a = [< field ]
-      type t = Period.date_field period
-      val empty : [< Period.date_field ] period
-      val add :
-        ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-      val sub :
-        ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-      val opp : ([< Period.date_field ] as 'a) period -> 'a period
-      val equal :
-        [< Period.date_field ] period ->
-        [< Period.date_field ] period -> bool
-      val compare :
-        [< Period.date_field ] period -> [< Period.date_field ] period -> int
-      val hash : [< Period.date_field ] period -> int
-      val make : int -> int -> int -> t
-      val lmake : ?year:int -> ?month:int -> ?day:int -> unit -> t
-      val year : int -> [< field > `Year ] period
-      val month : int -> [< field > `Month `Year ] period
-      val week : int -> [< field > `Day `Week ] period
-      val day : int -> [< field > `Day `Week ] period
-      exception Not_computable
-      val nb_days : [< field ] period -> int
-      val safe_nb_days : [< `Day | `Week ] period -> int
-      val ymd : [< field ] period -> int * int * int
-    end
-  val add : ([< field ] as 'a) date -> 'Period.period -> 'a date
-  val sub :
-    ([< field ] as 'a) date ->
-    'a date -> [< field > `Day `Week ] Period.period
-  val precise_sub : ([< field ] as 'a) date -> 'a date -> Period.t
-  val rem : ([< field ] as 'a) date -> 'Period.period -> 'a date
-  val next : ([< field ] as 'a) date -> '-> 'a date
-  val prev : ([< field ] as 'a) date -> '-> 'a date
-  val is_leap_year : year -> bool
-  val same_calendar : year -> year -> bool
-  val days_in_year : ?month:month -> year -> int
-  val weeks_in_year : year -> int
-  val week_first_last : int -> year -> t * t
-  val nth_weekday_of_month : year -> month -> day -> int -> t
-  val century : year -> int
-  val millenium : year -> int
-  val solar_number : year -> int
-  val indiction : year -> int
-  val golden_number : year -> int
-  val epact : year -> int
-  val easter : year -> t
-  val carnaval : year -> t
-  val mardi_gras : year -> t
-  val ash : year -> t
-  val palm : year -> t
-  val easter_friday : year -> t
-  val easter_saturday : year -> t
-  val easter_monday : year -> t
-  val ascension : year -> t
-  val withsunday : year -> t
-  val withmonday : year -> t
-  val corpus_christi : year -> t
-end
\ No newline at end of file diff --git a/doc/type_Date_sig.S.Period.html b/doc/type_Date_sig.S.Period.html deleted file mode 100644 index 8d39441..0000000 --- a/doc/type_Date_sig.S.Period.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Date_sig.S.Period - - -sig
-  type +'a p constraint 'a = [< Date_sig.S.field ]
-  type +'a period = 'a p constraint 'a = [< field ]
-  type t = Period.date_field period
-  val empty : [< Period.date_field ] period
-  val add : ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-  val sub : ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-  val opp : ([< Period.date_field ] as 'a) period -> 'a period
-  val equal :
-    [< Period.date_field ] period -> [< Period.date_field ] period -> bool
-  val compare :
-    [< Period.date_field ] period -> [< Period.date_field ] period -> int
-  val hash : [< Period.date_field ] period -> int
-  val make : int -> int -> int -> Date_sig.S.t
-  val lmake : ?year:int -> ?month:int -> ?day:int -> unit -> Date_sig.S.t
-  val year : int -> [< Date_sig.S.field > `Year ] period
-  val month : int -> [< Date_sig.S.field > `Month `Year ] period
-  val week : int -> [< Date_sig.S.field > `Day `Week ] period
-  val day : int -> [< Date_sig.S.field > `Day `Week ] period
-  exception Not_computable
-  val nb_days : [< Date_sig.S.field ] period -> int
-  val safe_nb_days : [< `Day | `Week ] period -> int
-  val ymd : [< Date_sig.S.field ] period -> int * int * int
-end
\ No newline at end of file diff --git a/doc/type_Date_sig.S.html b/doc/type_Date_sig.S.html deleted file mode 100644 index 4a4d4e2..0000000 --- a/doc/type_Date_sig.S.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Date_sig.S - - -sig
-  type field = Period.date_field
-  type -'a date constraint 'a = [< Date_sig.S.field ]
-  type t = Date_sig.S.field Date_sig.S.date
-  type day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-  type month =
-      Jan
-    | Feb
-    | Mar
-    | Apr
-    | May
-    | Jun
-    | Jul
-    | Aug
-    | Sep
-    | Oct
-    | Nov
-    | Dec
-  type year = int
-  exception Out_of_bounds
-  exception Undefined
-  val make : Date_sig.S.year -> int -> int -> Date_sig.S.t
-  val lmake :
-    year:Date_sig.S.year -> ?month:int -> ?day:int -> unit -> Date_sig.S.t
-  val make_year : int -> [< `Year ] Date_sig.S.date
-  val make_year_month : int -> int -> [< `Month | `Year ] Date_sig.S.date
-  val today : unit -> Date_sig.S.t
-  val from_jd : int -> Date_sig.S.t
-  val from_mjd : int -> Date_sig.S.t
-  val from_day_of_year : Date_sig.S.year -> int -> Date_sig.S.t
-  val days_in_month :
-    [< Date_sig.S.field > `Month `Year ] Date_sig.S.date -> int
-  val day_of_week : Date_sig.S.t -> Date_sig.S.day
-  val day_of_month : Date_sig.S.t -> int
-  val day_of_year : Date_sig.S.t -> int
-  val week : Date_sig.S.t -> int
-  val month :
-    [< Date_sig.S.field > `Month ] Date_sig.S.date -> Date_sig.S.month
-  val year : [< Date_sig.S.field > `Year ] Date_sig.S.date -> Date_sig.S.year
-  val to_jd : Date_sig.S.t -> int
-  val to_mjd : Date_sig.S.t -> int
-  val equal :
-    [< Date_sig.S.field ] Date_sig.S.date ->
-    [< Date_sig.S.field ] Date_sig.S.date -> bool
-  val compare :
-    [< Date_sig.S.field ] Date_sig.S.date ->
-    [< Date_sig.S.field ] Date_sig.S.date -> int
-  val hash : [< Date_sig.S.field ] Date_sig.S.date -> int
-  val is_valid_date : Date_sig.S.year -> int -> int -> bool
-  val is_leap_day : Date_sig.S.t -> bool
-  val is_gregorian : Date_sig.S.t -> bool
-  val is_julian : Date_sig.S.t -> bool
-  val to_unixtm : Date_sig.S.t -> Unix.tm
-  val from_unixtm : Unix.tm -> Date_sig.S.t
-  val to_unixfloat : Date_sig.S.t -> float
-  val from_unixfloat : float -> Date_sig.S.t
-  val to_business : Date_sig.S.t -> Date_sig.S.year * int * Date_sig.S.day
-  val from_business :
-    Date_sig.S.year -> int -> Date_sig.S.day -> Date_sig.S.t
-  val int_of_day : Date_sig.S.day -> int
-  val day_of_int : int -> Date_sig.S.day
-  val int_of_month : Date_sig.S.month -> int
-  val month_of_int : int -> Date_sig.S.month
-  module Period :
-    sig
-      type +'a p constraint 'a = [< Date_sig.S.field ]
-      type +'a period = 'a p constraint 'a = [< field ]
-      type t = Period.date_field period
-      val empty : [< Period.date_field ] period
-      val add :
-        ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-      val sub :
-        ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-      val opp : ([< Period.date_field ] as 'a) period -> 'a period
-      val equal :
-        [< Period.date_field ] period ->
-        [< Period.date_field ] period -> bool
-      val compare :
-        [< Period.date_field ] period -> [< Period.date_field ] period -> int
-      val hash : [< Period.date_field ] period -> int
-      val make : int -> int -> int -> Date_sig.S.t
-      val lmake : ?year:int -> ?month:int -> ?day:int -> unit -> Date_sig.S.t
-      val year : int -> [< Date_sig.S.field > `Year ] period
-      val month : int -> [< Date_sig.S.field > `Month `Year ] period
-      val week : int -> [< Date_sig.S.field > `Day `Week ] period
-      val day : int -> [< Date_sig.S.field > `Day `Week ] period
-      exception Not_computable
-      val nb_days : [< Date_sig.S.field ] period -> int
-      val safe_nb_days : [< `Day | `Week ] period -> int
-      val ymd : [< Date_sig.S.field ] period -> int * int * int
-    end
-  val add :
-    ([< Date_sig.S.field ] as 'a) Date_sig.S.date ->
-    'Date_sig.S.Period.period -> 'Date_sig.S.date
-  val sub :
-    ([< Date_sig.S.field ] as 'a) Date_sig.S.date ->
-    'Date_sig.S.date ->
-    [< Date_sig.S.field > `Day `Week ] Date_sig.S.Period.period
-  val precise_sub :
-    ([< Date_sig.S.field ] as 'a) Date_sig.S.date ->
-    'Date_sig.S.date -> Date_sig.S.Period.t
-  val rem :
-    ([< Date_sig.S.field ] as 'a) Date_sig.S.date ->
-    'Date_sig.S.Period.period -> 'Date_sig.S.date
-  val next :
-    ([< Date_sig.S.field ] as 'a) Date_sig.S.date -> '-> 'Date_sig.S.date
-  val prev :
-    ([< Date_sig.S.field ] as 'a) Date_sig.S.date -> '-> 'Date_sig.S.date
-  val is_leap_year : Date_sig.S.year -> bool
-  val same_calendar : Date_sig.S.year -> Date_sig.S.year -> bool
-  val days_in_year : ?month:Date_sig.S.month -> Date_sig.S.year -> int
-  val weeks_in_year : Date_sig.S.year -> int
-  val week_first_last : int -> Date_sig.S.year -> Date_sig.S.t * Date_sig.S.t
-  val nth_weekday_of_month :
-    Date_sig.S.year ->
-    Date_sig.S.month -> Date_sig.S.day -> int -> Date_sig.S.t
-  val century : Date_sig.S.year -> int
-  val millenium : Date_sig.S.year -> int
-  val solar_number : Date_sig.S.year -> int
-  val indiction : Date_sig.S.year -> int
-  val golden_number : Date_sig.S.year -> int
-  val epact : Date_sig.S.year -> int
-  val easter : Date_sig.S.year -> Date_sig.S.t
-  val carnaval : Date_sig.S.year -> Date_sig.S.t
-  val mardi_gras : Date_sig.S.year -> Date_sig.S.t
-  val ash : Date_sig.S.year -> Date_sig.S.t
-  val palm : Date_sig.S.year -> Date_sig.S.t
-  val easter_friday : Date_sig.S.year -> Date_sig.S.t
-  val easter_saturday : Date_sig.S.year -> Date_sig.S.t
-  val easter_monday : Date_sig.S.year -> Date_sig.S.t
-  val ascension : Date_sig.S.year -> Date_sig.S.t
-  val withsunday : Date_sig.S.year -> Date_sig.S.t
-  val withmonday : Date_sig.S.year -> Date_sig.S.t
-  val corpus_christi : Date_sig.S.year -> Date_sig.S.t
-end
\ No newline at end of file diff --git a/doc/type_Date_sig.html b/doc/type_Date_sig.html deleted file mode 100644 index 2311890..0000000 --- a/doc/type_Date_sig.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Date_sig - - -sig
-  module type S =
-    sig
-      type field = Period.date_field
-      type -'a date constraint 'a = [< Date_sig.S.field ]
-      type t = Date_sig.S.field Date_sig.S.date
-      type day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-      type month =
-          Jan
-        | Feb
-        | Mar
-        | Apr
-        | May
-        | Jun
-        | Jul
-        | Aug
-        | Sep
-        | Oct
-        | Nov
-        | Dec
-      type year = int
-      exception Out_of_bounds
-      exception Undefined
-      val make : Date_sig.S.year -> int -> int -> Date_sig.S.t
-      val lmake :
-        year:Date_sig.S.year ->
-        ?month:int -> ?day:int -> unit -> Date_sig.S.t
-      val make_year : int -> [< `Year ] Date_sig.S.date
-      val make_year_month : int -> int -> [< `Month | `Year ] Date_sig.S.date
-      val today : unit -> Date_sig.S.t
-      val from_jd : int -> Date_sig.S.t
-      val from_mjd : int -> Date_sig.S.t
-      val from_day_of_year : Date_sig.S.year -> int -> Date_sig.S.t
-      val days_in_month :
-        [< Date_sig.S.field > `Month `Year ] Date_sig.S.date -> int
-      val day_of_week : Date_sig.S.t -> Date_sig.S.day
-      val day_of_month : Date_sig.S.t -> int
-      val day_of_year : Date_sig.S.t -> int
-      val week : Date_sig.S.t -> int
-      val month :
-        [< Date_sig.S.field > `Month ] Date_sig.S.date -> Date_sig.S.month
-      val year :
-        [< Date_sig.S.field > `Year ] Date_sig.S.date -> Date_sig.S.year
-      val to_jd : Date_sig.S.t -> int
-      val to_mjd : Date_sig.S.t -> int
-      val equal :
-        [< Date_sig.S.field ] Date_sig.S.date ->
-        [< Date_sig.S.field ] Date_sig.S.date -> bool
-      val compare :
-        [< Date_sig.S.field ] Date_sig.S.date ->
-        [< Date_sig.S.field ] Date_sig.S.date -> int
-      val hash : [< Date_sig.S.field ] Date_sig.S.date -> int
-      val is_valid_date : Date_sig.S.year -> int -> int -> bool
-      val is_leap_day : Date_sig.S.t -> bool
-      val is_gregorian : Date_sig.S.t -> bool
-      val is_julian : Date_sig.S.t -> bool
-      val to_unixtm : Date_sig.S.t -> Unix.tm
-      val from_unixtm : Unix.tm -> Date_sig.S.t
-      val to_unixfloat : Date_sig.S.t -> float
-      val from_unixfloat : float -> Date_sig.S.t
-      val to_business :
-        Date_sig.S.t -> Date_sig.S.year * int * Date_sig.S.day
-      val from_business :
-        Date_sig.S.year -> int -> Date_sig.S.day -> Date_sig.S.t
-      val int_of_day : Date_sig.S.day -> int
-      val day_of_int : int -> Date_sig.S.day
-      val int_of_month : Date_sig.S.month -> int
-      val month_of_int : int -> Date_sig.S.month
-      module Period :
-        sig
-          type +'a p constraint 'a = [< Date_sig.S.field ]
-          type +'a period = 'a p constraint 'a = [< field ]
-          type t = Period.date_field period
-          val empty : [< Period.date_field ] period
-          val add :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val sub :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val opp : ([< Period.date_field ] as 'a) period -> 'a period
-          val equal :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> bool
-          val compare :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> int
-          val hash : [< Period.date_field ] period -> int
-          val make : int -> int -> int -> Date_sig.S.t
-          val lmake :
-            ?year:int -> ?month:int -> ?day:int -> unit -> Date_sig.S.t
-          val year : int -> [< Date_sig.S.field > `Year ] period
-          val month : int -> [< Date_sig.S.field > `Month `Year ] period
-          val week : int -> [< Date_sig.S.field > `Day `Week ] period
-          val day : int -> [< Date_sig.S.field > `Day `Week ] period
-          exception Not_computable
-          val nb_days : [< Date_sig.S.field ] period -> int
-          val safe_nb_days : [< `Day | `Week ] period -> int
-          val ymd : [< Date_sig.S.field ] period -> int * int * int
-        end
-      val add :
-        ([< Date_sig.S.field ] as 'a) Date_sig.S.date ->
-        'Date_sig.S.Period.period -> 'Date_sig.S.date
-      val sub :
-        ([< Date_sig.S.field ] as 'a) Date_sig.S.date ->
-        'Date_sig.S.date ->
-        [< Date_sig.S.field > `Day `Week ] Date_sig.S.Period.period
-      val precise_sub :
-        ([< Date_sig.S.field ] as 'a) Date_sig.S.date ->
-        'Date_sig.S.date -> Date_sig.S.Period.t
-      val rem :
-        ([< Date_sig.S.field ] as 'a) Date_sig.S.date ->
-        'Date_sig.S.Period.period -> 'Date_sig.S.date
-      val next :
-        ([< Date_sig.S.field ] as 'a) Date_sig.S.date ->
-        '-> 'Date_sig.S.date
-      val prev :
-        ([< Date_sig.S.field ] as 'a) Date_sig.S.date ->
-        '-> 'Date_sig.S.date
-      val is_leap_year : Date_sig.S.year -> bool
-      val same_calendar : Date_sig.S.year -> Date_sig.S.year -> bool
-      val days_in_year : ?month:Date_sig.S.month -> Date_sig.S.year -> int
-      val weeks_in_year : Date_sig.S.year -> int
-      val week_first_last :
-        int -> Date_sig.S.year -> Date_sig.S.t * Date_sig.S.t
-      val nth_weekday_of_month :
-        Date_sig.S.year ->
-        Date_sig.S.month -> Date_sig.S.day -> int -> Date_sig.S.t
-      val century : Date_sig.S.year -> int
-      val millenium : Date_sig.S.year -> int
-      val solar_number : Date_sig.S.year -> int
-      val indiction : Date_sig.S.year -> int
-      val golden_number : Date_sig.S.year -> int
-      val epact : Date_sig.S.year -> int
-      val easter : Date_sig.S.year -> Date_sig.S.t
-      val carnaval : Date_sig.S.year -> Date_sig.S.t
-      val mardi_gras : Date_sig.S.year -> Date_sig.S.t
-      val ash : Date_sig.S.year -> Date_sig.S.t
-      val palm : Date_sig.S.year -> Date_sig.S.t
-      val easter_friday : Date_sig.S.year -> Date_sig.S.t
-      val easter_saturday : Date_sig.S.year -> Date_sig.S.t
-      val easter_monday : Date_sig.S.year -> Date_sig.S.t
-      val ascension : Date_sig.S.year -> Date_sig.S.t
-      val withsunday : Date_sig.S.year -> Date_sig.S.t
-      val withmonday : Date_sig.S.year -> Date_sig.S.t
-      val corpus_christi : Date_sig.S.year -> Date_sig.S.t
-    end
-end
\ No newline at end of file diff --git a/doc/type_Fcalendar.Precise.html b/doc/type_Fcalendar.Precise.html deleted file mode 100644 index 5783696..0000000 --- a/doc/type_Fcalendar.Precise.html +++ /dev/null @@ -1,330 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Fcalendar.Precise - - -sig
-  module Date :
-    sig
-      type field = Period.date_field
-      type -'a date = 'Date.date constraint 'a = [< field ]
-      type t = field date
-      type day = Date.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-      type month =
-        Date.month =
-          Jan
-        | Feb
-        | Mar
-        | Apr
-        | May
-        | Jun
-        | Jul
-        | Aug
-        | Sep
-        | Oct
-        | Nov
-        | Dec
-      type year = int
-      exception Out_of_bounds
-      exception Undefined
-      val make : year -> int -> int -> t
-      val lmake : year:year -> ?month:int -> ?day:int -> unit -> t
-      val make_year : int -> [< `Year ] date
-      val make_year_month : int -> int -> [< `Month | `Year ] date
-      val today : unit -> t
-      val from_jd : int -> t
-      val from_mjd : int -> t
-      val from_day_of_year : year -> int -> t
-      val days_in_month : [< field > `Month `Year ] date -> int
-      val day_of_week : t -> day
-      val day_of_month : t -> int
-      val day_of_year : t -> int
-      val week : t -> int
-      val month : [< field > `Month ] date -> month
-      val year : [< field > `Year ] date -> year
-      val to_jd : t -> int
-      val to_mjd : t -> int
-      val equal : [< field ] date -> [< field ] date -> bool
-      val compare : [< field ] date -> [< field ] date -> int
-      val hash : [< field ] date -> int
-      val is_valid_date : year -> int -> int -> bool
-      val is_leap_day : t -> bool
-      val is_gregorian : t -> bool
-      val is_julian : t -> bool
-      val to_unixtm : t -> Unix.tm
-      val from_unixtm : Unix.tm -> t
-      val to_unixfloat : t -> float
-      val from_unixfloat : float -> t
-      val to_business : t -> year * int * day
-      val from_business : year -> int -> day -> t
-      val int_of_day : day -> int
-      val day_of_int : int -> day
-      val int_of_month : month -> int
-      val month_of_int : int -> month
-      module Period :
-        sig
-          type +'a p = 'Date.Period.p constraint 'a = [< field ]
-          type +'a period = 'a p constraint 'a = [< field ]
-          type t = Period.date_field period
-          val empty : [< Period.date_field ] period
-          val add :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val sub :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val opp : ([< Period.date_field ] as 'a) period -> 'a period
-          val equal :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> bool
-          val compare :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> int
-          val hash : [< Period.date_field ] period -> int
-          val make : int -> int -> int -> t
-          val lmake : ?year:int -> ?month:int -> ?day:int -> unit -> t
-          val year : int -> [< field > `Year ] period
-          val month : int -> [< field > `Month `Year ] period
-          val week : int -> [< field > `Day `Week ] period
-          val day : int -> [< field > `Day `Week ] period
-          exception Not_computable
-          val nb_days : [< field ] period -> int
-          val safe_nb_days : [< `Day | `Week ] period -> int
-          val ymd : [< field ] period -> int * int * int
-        end
-      val add : ([< field ] as 'a) date -> 'Period.period -> 'a date
-      val sub :
-        ([< field ] as 'a) date ->
-        'a date -> [< field > `Day `Week ] Period.period
-      val precise_sub : ([< field ] as 'a) date -> 'a date -> Period.t
-      val rem : ([< field ] as 'a) date -> 'Period.period -> 'a date
-      val next : ([< field ] as 'a) date -> '-> 'a date
-      val prev : ([< field ] as 'a) date -> '-> 'a date
-      val is_leap_year : year -> bool
-      val same_calendar : year -> year -> bool
-      val days_in_year : ?month:month -> year -> int
-      val weeks_in_year : year -> int
-      val week_first_last : int -> year -> t * t
-      val nth_weekday_of_month : year -> month -> day -> int -> t
-      val century : year -> int
-      val millenium : year -> int
-      val solar_number : year -> int
-      val indiction : year -> int
-      val golden_number : year -> int
-      val epact : year -> int
-      val easter : year -> t
-      val carnaval : year -> t
-      val mardi_gras : year -> t
-      val ash : year -> t
-      val palm : year -> t
-      val easter_friday : year -> t
-      val easter_saturday : year -> t
-      val easter_monday : year -> t
-      val ascension : year -> t
-      val withsunday : year -> t
-      val withmonday : year -> t
-      val corpus_christi : year -> t
-    end
-  module Time :
-    sig
-      type t = Ftime.t
-      type field = [ `Hour | `Minute | `Second ]
-      type second = float
-      module Second :
-        sig
-          type t = second
-          val from_int : int -> t
-          val from_float : float -> t
-          val to_int : t -> int
-          val to_float : t -> float
-        end
-      val make : int -> int -> second -> t
-      val lmake : ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-      val now : unit -> t
-      val midnight : unit -> t
-      val midday : unit -> t
-      val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-      val from_gmt : t -> t
-      val to_gmt : t -> t
-      val normalize : t -> t * int
-      val hour : t -> int
-      val minute : t -> int
-      val second : t -> second
-      val to_seconds : t -> second
-      val to_minutes : t -> float
-      val to_hours : t -> float
-      val equal : t -> t -> bool
-      val compare : t -> t -> int
-      val hash : t -> int
-      val is_pm : t -> bool
-      val is_am : t -> bool
-      val from_seconds : second -> t
-      val from_minutes : float -> t
-      val from_hours : float -> t
-      module Period :
-        sig
-          type +'a period = 'Ftime.Period.period
-            constraint 'a = [< Period.date_field ]
-          type t = Period.date_field period
-          val empty : [< Period.date_field ] period
-          val add :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val sub :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val opp : ([< Period.date_field ] as 'a) period -> 'a period
-          val equal :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> bool
-          val compare :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> int
-          val hash : [< Period.date_field ] period -> int
-          val length : [< Period.date_field ] period -> second
-          val mul :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val div :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val make : int -> int -> second -> [< Period.date_field ] period
-          val lmake :
-            ?hour:int ->
-            ?minute:int ->
-            ?second:second -> unit -> [< Period.date_field ] period
-          val hour : int -> [< Period.date_field ] period
-          val minute : int -> [< Period.date_field ] period
-          val second : second -> [< Period.date_field ] period
-          val to_seconds : [< Period.date_field ] period -> second
-          val to_minutes : [< Period.date_field ] period -> float
-          val to_hours : [< Period.date_field ] period -> float
-        end
-      val add : t -> [< Period.date_field ] Period.period -> t
-      val sub : t -> t -> [< Period.date_field ] Period.period
-      val rem : t -> [< Period.date_field ] Period.period -> t
-      val next : t -> field -> t
-      val prev : t -> field -> t
-    end
-  type t
-  type day = Date.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-  type month =
-    Date.month =
-      Jan
-    | Feb
-    | Mar
-    | Apr
-    | May
-    | Jun
-    | Jul
-    | Aug
-    | Sep
-    | Oct
-    | Nov
-    | Dec
-  type year = Date.year
-  type second = Time.second
-  type field = [ `Day | `Hour | `Minute | `Month | `Second | `Week | `Year ]
-  val make : int -> int -> int -> int -> int -> second -> t
-  val lmake :
-    year:int ->
-    ?month:int ->
-    ?day:int -> ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-  val create : Date.t -> Time.t -> t
-  val now : unit -> t
-  val from_jd : float -> t
-  val from_mjd : float -> t
-  val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-  val to_gmt : t -> t
-  val from_gmt : t -> t
-  val days_in_month : t -> int
-  val day_of_week : t -> day
-  val day_of_month : t -> int
-  val day_of_year : t -> int
-  val week : t -> int
-  val month : t -> month
-  val year : t -> int
-  val to_jd : t -> float
-  val to_mjd : t -> float
-  val hour : t -> int
-  val minute : t -> int
-  val second : t -> second
-  val equal : t -> t -> bool
-  val compare : t -> t -> int
-  val hash : t -> int
-  val is_leap_day : t -> bool
-  val is_gregorian : t -> bool
-  val is_julian : t -> bool
-  val is_pm : t -> bool
-  val is_am : t -> bool
-  val to_unixtm : t -> Unix.tm
-  val from_unixtm : Unix.tm -> t
-  val to_unixfloat : t -> float
-  val from_unixfloat : float -> t
-  val from_date : Date.t -> t
-  val to_date : t -> Date.t
-  val to_time : t -> Time.t
-  module Period :
-    sig
-      type +'a period constraint 'a = [< Period.date_field ]
-      type t = Period.date_field period
-      val empty : [< Period.date_field ] period
-      val add :
-        ([< Period.date_field > `Day `Week ] as 'a) period ->
-        'a period -> 'a period
-      val sub :
-        ([< Period.date_field > `Day `Week ] as 'a) period ->
-        'a period -> 'a period
-      val opp :
-        ([< Period.date_field > `Day `Week ] as 'a) period -> 'a period
-      val equal :
-        [< Period.date_field ] period ->
-        [< Period.date_field ] period -> bool
-      val compare :
-        [< Period.date_field ] period -> [< Period.date_field ] period -> int
-      val hash : [< Period.date_field ] period -> int
-      val make : int -> int -> int -> int -> int -> second -> t
-      val lmake :
-        ?year:int ->
-        ?month:int ->
-        ?day:int -> ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-      val year : int -> [< Period.date_field > `Year ] period
-      val month : int -> [< Period.date_field > `Month `Year ] period
-      val week : int -> [< Period.date_field > `Day `Week ] period
-      val day : int -> [< Period.date_field > `Day `Week ] period
-      val hour : int -> [< Period.date_field > `Day `Week ] period
-      val minute : int -> [< Period.date_field > `Day `Week ] period
-      val second : second -> [< Period.date_field > `Day `Week ] period
-      val from_date :
-        ([< Period.date_field ] as 'a) Date.Period.period -> 'a period
-      val from_time :
-        ([< Period.date_field ] as 'a) Time.Period.period -> 'a period
-      val to_date : ([< Date.field ] as 'a) period -> 'Date.Period.period
-      exception Not_computable
-      val to_time :
-        ([< Period.date_field ] as 'a) period -> 'Time.Period.period
-      val safe_to_time :
-        ([< `Day | `Week ] as 'a) period -> 'Time.Period.period
-      val ymds : [< Period.date_field ] period -> int * int * int * second
-    end
-  val add : t -> [< Period.date_field ] Period.period -> t
-  val sub : t -> t -> [< Period.date_field > `Day `Week ] Period.period
-  val precise_sub : t -> t -> Period.t
-  val rem : t -> [< Period.date_field ] Period.period -> t
-  val next : t -> field -> t
-  val prev : t -> field -> t
-end
\ No newline at end of file diff --git a/doc/type_Fcalendar.html b/doc/type_Fcalendar.html deleted file mode 100644 index bcc26dc..0000000 --- a/doc/type_Fcalendar.html +++ /dev/null @@ -1,648 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Fcalendar - - -sig
-  module Date :
-    sig
-      type field = Period.date_field
-      type -'a date = 'Date.date constraint 'a = [< field ]
-      type t = field date
-      type day = Date.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-      type month =
-        Date.month =
-          Jan
-        | Feb
-        | Mar
-        | Apr
-        | May
-        | Jun
-        | Jul
-        | Aug
-        | Sep
-        | Oct
-        | Nov
-        | Dec
-      type year = int
-      exception Out_of_bounds
-      exception Undefined
-      val make : year -> int -> int -> t
-      val lmake : year:year -> ?month:int -> ?day:int -> unit -> t
-      val make_year : int -> [< `Year ] date
-      val make_year_month : int -> int -> [< `Month | `Year ] date
-      val today : unit -> t
-      val from_jd : int -> t
-      val from_mjd : int -> t
-      val from_day_of_year : year -> int -> t
-      val days_in_month : [< field > `Month `Year ] date -> int
-      val day_of_week : t -> day
-      val day_of_month : t -> int
-      val day_of_year : t -> int
-      val week : t -> int
-      val month : [< field > `Month ] date -> month
-      val year : [< field > `Year ] date -> year
-      val to_jd : t -> int
-      val to_mjd : t -> int
-      val equal : [< field ] date -> [< field ] date -> bool
-      val compare : [< field ] date -> [< field ] date -> int
-      val hash : [< field ] date -> int
-      val is_valid_date : year -> int -> int -> bool
-      val is_leap_day : t -> bool
-      val is_gregorian : t -> bool
-      val is_julian : t -> bool
-      val to_unixtm : t -> Unix.tm
-      val from_unixtm : Unix.tm -> t
-      val to_unixfloat : t -> float
-      val from_unixfloat : float -> t
-      val to_business : t -> year * int * day
-      val from_business : year -> int -> day -> t
-      val int_of_day : day -> int
-      val day_of_int : int -> day
-      val int_of_month : month -> int
-      val month_of_int : int -> month
-      module Period :
-        sig
-          type +'a p = 'Date.Period.p constraint 'a = [< field ]
-          type +'a period = 'a p constraint 'a = [< field ]
-          type t = Period.date_field period
-          val empty : [< Period.date_field ] period
-          val add :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val sub :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val opp : ([< Period.date_field ] as 'a) period -> 'a period
-          val equal :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> bool
-          val compare :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> int
-          val hash : [< Period.date_field ] period -> int
-          val make : int -> int -> int -> t
-          val lmake : ?year:int -> ?month:int -> ?day:int -> unit -> t
-          val year : int -> [< field > `Year ] period
-          val month : int -> [< field > `Month `Year ] period
-          val week : int -> [< field > `Day `Week ] period
-          val day : int -> [< field > `Day `Week ] period
-          exception Not_computable
-          val nb_days : [< field ] period -> int
-          val safe_nb_days : [< `Day | `Week ] period -> int
-          val ymd : [< field ] period -> int * int * int
-        end
-      val add : ([< field ] as 'a) date -> 'Period.period -> 'a date
-      val sub :
-        ([< field ] as 'a) date ->
-        'a date -> [< field > `Day `Week ] Period.period
-      val precise_sub : ([< field ] as 'a) date -> 'a date -> Period.t
-      val rem : ([< field ] as 'a) date -> 'Period.period -> 'a date
-      val next : ([< field ] as 'a) date -> '-> 'a date
-      val prev : ([< field ] as 'a) date -> '-> 'a date
-      val is_leap_year : year -> bool
-      val same_calendar : year -> year -> bool
-      val days_in_year : ?month:month -> year -> int
-      val weeks_in_year : year -> int
-      val week_first_last : int -> year -> t * t
-      val nth_weekday_of_month : year -> month -> day -> int -> t
-      val century : year -> int
-      val millenium : year -> int
-      val solar_number : year -> int
-      val indiction : year -> int
-      val golden_number : year -> int
-      val epact : year -> int
-      val easter : year -> t
-      val carnaval : year -> t
-      val mardi_gras : year -> t
-      val ash : year -> t
-      val palm : year -> t
-      val easter_friday : year -> t
-      val easter_saturday : year -> t
-      val easter_monday : year -> t
-      val ascension : year -> t
-      val withsunday : year -> t
-      val withmonday : year -> t
-      val corpus_christi : year -> t
-    end
-  module Time :
-    sig
-      type t = Ftime.t
-      type field = [ `Hour | `Minute | `Second ]
-      type second = float
-      module Second :
-        sig
-          type t = second
-          val from_int : int -> t
-          val from_float : float -> t
-          val to_int : t -> int
-          val to_float : t -> float
-        end
-      val make : int -> int -> second -> t
-      val lmake : ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-      val now : unit -> t
-      val midnight : unit -> t
-      val midday : unit -> t
-      val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-      val from_gmt : t -> t
-      val to_gmt : t -> t
-      val normalize : t -> t * int
-      val hour : t -> int
-      val minute : t -> int
-      val second : t -> second
-      val to_seconds : t -> second
-      val to_minutes : t -> float
-      val to_hours : t -> float
-      val equal : t -> t -> bool
-      val compare : t -> t -> int
-      val hash : t -> int
-      val is_pm : t -> bool
-      val is_am : t -> bool
-      val from_seconds : second -> t
-      val from_minutes : float -> t
-      val from_hours : float -> t
-      module Period :
-        sig
-          type +'a period = 'Ftime.Period.period
-            constraint 'a = [< Period.date_field ]
-          type t = Period.date_field period
-          val empty : [< Period.date_field ] period
-          val add :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val sub :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val opp : ([< Period.date_field ] as 'a) period -> 'a period
-          val equal :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> bool
-          val compare :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> int
-          val hash : [< Period.date_field ] period -> int
-          val length : [< Period.date_field ] period -> second
-          val mul :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val div :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val make : int -> int -> second -> [< Period.date_field ] period
-          val lmake :
-            ?hour:int ->
-            ?minute:int ->
-            ?second:second -> unit -> [< Period.date_field ] period
-          val hour : int -> [< Period.date_field ] period
-          val minute : int -> [< Period.date_field ] period
-          val second : second -> [< Period.date_field ] period
-          val to_seconds : [< Period.date_field ] period -> second
-          val to_minutes : [< Period.date_field ] period -> float
-          val to_hours : [< Period.date_field ] period -> float
-        end
-      val add : t -> [< Period.date_field ] Period.period -> t
-      val sub : t -> t -> [< Period.date_field ] Period.period
-      val rem : t -> [< Period.date_field ] Period.period -> t
-      val next : t -> field -> t
-      val prev : t -> field -> t
-    end
-  type t
-  type day = Date.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-  type month =
-    Date.month =
-      Jan
-    | Feb
-    | Mar
-    | Apr
-    | May
-    | Jun
-    | Jul
-    | Aug
-    | Sep
-    | Oct
-    | Nov
-    | Dec
-  type year = Date.year
-  type second = Time.second
-  type field = [ `Day | `Hour | `Minute | `Month | `Second | `Week | `Year ]
-  val make : int -> int -> int -> int -> int -> second -> t
-  val lmake :
-    year:int ->
-    ?month:int ->
-    ?day:int -> ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-  val create : Date.t -> Time.t -> t
-  val now : unit -> t
-  val from_jd : float -> t
-  val from_mjd : float -> t
-  val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-  val to_gmt : t -> t
-  val from_gmt : t -> t
-  val days_in_month : t -> int
-  val day_of_week : t -> day
-  val day_of_month : t -> int
-  val day_of_year : t -> int
-  val week : t -> int
-  val month : t -> month
-  val year : t -> int
-  val to_jd : t -> float
-  val to_mjd : t -> float
-  val hour : t -> int
-  val minute : t -> int
-  val second : t -> second
-  val equal : t -> t -> bool
-  val compare : t -> t -> int
-  val hash : t -> int
-  val is_leap_day : t -> bool
-  val is_gregorian : t -> bool
-  val is_julian : t -> bool
-  val is_pm : t -> bool
-  val is_am : t -> bool
-  val to_unixtm : t -> Unix.tm
-  val from_unixtm : Unix.tm -> t
-  val to_unixfloat : t -> float
-  val from_unixfloat : float -> t
-  val from_date : Date.t -> t
-  val to_date : t -> Date.t
-  val to_time : t -> Time.t
-  module Period :
-    sig
-      type +'a period constraint 'a = [< Period.date_field ]
-      type t = Period.date_field period
-      val empty : [< Period.date_field ] period
-      val add :
-        ([< Period.date_field > `Day `Week ] as 'a) period ->
-        'a period -> 'a period
-      val sub :
-        ([< Period.date_field > `Day `Week ] as 'a) period ->
-        'a period -> 'a period
-      val opp :
-        ([< Period.date_field > `Day `Week ] as 'a) period -> 'a period
-      val equal :
-        [< Period.date_field ] period ->
-        [< Period.date_field ] period -> bool
-      val compare :
-        [< Period.date_field ] period -> [< Period.date_field ] period -> int
-      val hash : [< Period.date_field ] period -> int
-      val make : int -> int -> int -> int -> int -> second -> t
-      val lmake :
-        ?year:int ->
-        ?month:int ->
-        ?day:int -> ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-      val year : int -> [< Period.date_field > `Year ] period
-      val month : int -> [< Period.date_field > `Month `Year ] period
-      val week : int -> [< Period.date_field > `Day `Week ] period
-      val day : int -> [< Period.date_field > `Day `Week ] period
-      val hour : int -> [< Period.date_field > `Day `Week ] period
-      val minute : int -> [< Period.date_field > `Day `Week ] period
-      val second : second -> [< Period.date_field > `Day `Week ] period
-      val from_date :
-        ([< Period.date_field ] as 'a) Date.Period.period -> 'a period
-      val from_time :
-        ([< Period.date_field ] as 'a) Time.Period.period -> 'a period
-      val to_date : ([< Date.field ] as 'a) period -> 'Date.Period.period
-      exception Not_computable
-      val to_time :
-        ([< Period.date_field ] as 'a) period -> 'Time.Period.period
-      val safe_to_time :
-        ([< `Day | `Week ] as 'a) period -> 'Time.Period.period
-      val ymds : [< Period.date_field ] period -> int * int * int * second
-    end
-  val add : t -> [< Period.date_field ] Period.period -> t
-  val sub : t -> t -> [< Period.date_field > `Day `Week ] Period.period
-  val precise_sub : t -> t -> Period.t
-  val rem : t -> [< Period.date_field ] Period.period -> t
-  val next : t -> field -> t
-  val prev : t -> field -> t
-  module Precise :
-    sig
-      module Date :
-        sig
-          type field = Period.date_field
-          type -'a date = 'Date.date constraint 'a = [< field ]
-          type t = field date
-          type day = Date.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-          type month =
-            Date.month =
-              Jan
-            | Feb
-            | Mar
-            | Apr
-            | May
-            | Jun
-            | Jul
-            | Aug
-            | Sep
-            | Oct
-            | Nov
-            | Dec
-          type year = int
-          exception Out_of_bounds
-          exception Undefined
-          val make : year -> int -> int -> t
-          val lmake : year:year -> ?month:int -> ?day:int -> unit -> t
-          val make_year : int -> [< `Year ] date
-          val make_year_month : int -> int -> [< `Month | `Year ] date
-          val today : unit -> t
-          val from_jd : int -> t
-          val from_mjd : int -> t
-          val from_day_of_year : year -> int -> t
-          val days_in_month : [< field > `Month `Year ] date -> int
-          val day_of_week : t -> day
-          val day_of_month : t -> int
-          val day_of_year : t -> int
-          val week : t -> int
-          val month : [< field > `Month ] date -> month
-          val year : [< field > `Year ] date -> year
-          val to_jd : t -> int
-          val to_mjd : t -> int
-          val equal : [< field ] date -> [< field ] date -> bool
-          val compare : [< field ] date -> [< field ] date -> int
-          val hash : [< field ] date -> int
-          val is_valid_date : year -> int -> int -> bool
-          val is_leap_day : t -> bool
-          val is_gregorian : t -> bool
-          val is_julian : t -> bool
-          val to_unixtm : t -> Unix.tm
-          val from_unixtm : Unix.tm -> t
-          val to_unixfloat : t -> float
-          val from_unixfloat : float -> t
-          val to_business : t -> year * int * day
-          val from_business : year -> int -> day -> t
-          val int_of_day : day -> int
-          val day_of_int : int -> day
-          val int_of_month : month -> int
-          val month_of_int : int -> month
-          module Period :
-            sig
-              type +'a p = 'Date.Period.p constraint 'a = [< field ]
-              type +'a period = 'a p constraint 'a = [< field ]
-              type t = Period.date_field period
-              val empty : [< Period.date_field ] period
-              val add :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val sub :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val opp : ([< Period.date_field ] as 'a) period -> 'a period
-              val equal :
-                [< Period.date_field ] period ->
-                [< Period.date_field ] period -> bool
-              val compare :
-                [< Period.date_field ] period ->
-                [< Period.date_field ] period -> int
-              val hash : [< Period.date_field ] period -> int
-              val make : int -> int -> int -> t
-              val lmake : ?year:int -> ?month:int -> ?day:int -> unit -> t
-              val year : int -> [< field > `Year ] period
-              val month : int -> [< field > `Month `Year ] period
-              val week : int -> [< field > `Day `Week ] period
-              val day : int -> [< field > `Day `Week ] period
-              exception Not_computable
-              val nb_days : [< field ] period -> int
-              val safe_nb_days : [< `Day | `Week ] period -> int
-              val ymd : [< field ] period -> int * int * int
-            end
-          val add : ([< field ] as 'a) date -> 'Period.period -> 'a date
-          val sub :
-            ([< field ] as 'a) date ->
-            'a date -> [< field > `Day `Week ] Period.period
-          val precise_sub : ([< field ] as 'a) date -> 'a date -> Period.t
-          val rem : ([< field ] as 'a) date -> 'Period.period -> 'a date
-          val next : ([< field ] as 'a) date -> '-> 'a date
-          val prev : ([< field ] as 'a) date -> '-> 'a date
-          val is_leap_year : year -> bool
-          val same_calendar : year -> year -> bool
-          val days_in_year : ?month:month -> year -> int
-          val weeks_in_year : year -> int
-          val week_first_last : int -> year -> t * t
-          val nth_weekday_of_month : year -> month -> day -> int -> t
-          val century : year -> int
-          val millenium : year -> int
-          val solar_number : year -> int
-          val indiction : year -> int
-          val golden_number : year -> int
-          val epact : year -> int
-          val easter : year -> t
-          val carnaval : year -> t
-          val mardi_gras : year -> t
-          val ash : year -> t
-          val palm : year -> t
-          val easter_friday : year -> t
-          val easter_saturday : year -> t
-          val easter_monday : year -> t
-          val ascension : year -> t
-          val withsunday : year -> t
-          val withmonday : year -> t
-          val corpus_christi : year -> t
-        end
-      module Time :
-        sig
-          type t = Ftime.t
-          type field = [ `Hour | `Minute | `Second ]
-          type second = float
-          module Second :
-            sig
-              type t = second
-              val from_int : int -> t
-              val from_float : float -> t
-              val to_int : t -> int
-              val to_float : t -> float
-            end
-          val make : int -> int -> second -> t
-          val lmake : ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-          val now : unit -> t
-          val midnight : unit -> t
-          val midday : unit -> t
-          val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-          val from_gmt : t -> t
-          val to_gmt : t -> t
-          val normalize : t -> t * int
-          val hour : t -> int
-          val minute : t -> int
-          val second : t -> second
-          val to_seconds : t -> second
-          val to_minutes : t -> float
-          val to_hours : t -> float
-          val equal : t -> t -> bool
-          val compare : t -> t -> int
-          val hash : t -> int
-          val is_pm : t -> bool
-          val is_am : t -> bool
-          val from_seconds : second -> t
-          val from_minutes : float -> t
-          val from_hours : float -> t
-          module Period :
-            sig
-              type +'a period = 'Ftime.Period.period
-                constraint 'a = [< Period.date_field ]
-              type t = Period.date_field period
-              val empty : [< Period.date_field ] period
-              val add :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val sub :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val opp : ([< Period.date_field ] as 'a) period -> 'a period
-              val equal :
-                [< Period.date_field ] period ->
-                [< Period.date_field ] period -> bool
-              val compare :
-                [< Period.date_field ] period ->
-                [< Period.date_field ] period -> int
-              val hash : [< Period.date_field ] period -> int
-              val length : [< Period.date_field ] period -> second
-              val mul :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val div :
-                ([< Period.date_field ] as 'a) period ->
-                'a period -> 'a period
-              val make :
-                int -> int -> second -> [< Period.date_field ] period
-              val lmake :
-                ?hour:int ->
-                ?minute:int ->
-                ?second:second -> unit -> [< Period.date_field ] period
-              val hour : int -> [< Period.date_field ] period
-              val minute : int -> [< Period.date_field ] period
-              val second : second -> [< Period.date_field ] period
-              val to_seconds : [< Period.date_field ] period -> second
-              val to_minutes : [< Period.date_field ] period -> float
-              val to_hours : [< Period.date_field ] period -> float
-            end
-          val add : t -> [< Period.date_field ] Period.period -> t
-          val sub : t -> t -> [< Period.date_field ] Period.period
-          val rem : t -> [< Period.date_field ] Period.period -> t
-          val next : t -> field -> t
-          val prev : t -> field -> t
-        end
-      type t
-      type day = Date.day = Sun | Mon | Tue | Wed | Thu | Fri | Sat
-      type month =
-        Date.month =
-          Jan
-        | Feb
-        | Mar
-        | Apr
-        | May
-        | Jun
-        | Jul
-        | Aug
-        | Sep
-        | Oct
-        | Nov
-        | Dec
-      type year = Date.year
-      type second = Time.second
-      type field =
-          [ `Day | `Hour | `Minute | `Month | `Second | `Week | `Year ]
-      val make : int -> int -> int -> int -> int -> second -> t
-      val lmake :
-        year:int ->
-        ?month:int ->
-        ?day:int -> ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-      val create : Date.t -> Time.t -> t
-      val now : unit -> t
-      val from_jd : float -> t
-      val from_mjd : float -> t
-      val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-      val to_gmt : t -> t
-      val from_gmt : t -> t
-      val days_in_month : t -> int
-      val day_of_week : t -> day
-      val day_of_month : t -> int
-      val day_of_year : t -> int
-      val week : t -> int
-      val month : t -> month
-      val year : t -> int
-      val to_jd : t -> float
-      val to_mjd : t -> float
-      val hour : t -> int
-      val minute : t -> int
-      val second : t -> second
-      val equal : t -> t -> bool
-      val compare : t -> t -> int
-      val hash : t -> int
-      val is_leap_day : t -> bool
-      val is_gregorian : t -> bool
-      val is_julian : t -> bool
-      val is_pm : t -> bool
-      val is_am : t -> bool
-      val to_unixtm : t -> Unix.tm
-      val from_unixtm : Unix.tm -> t
-      val to_unixfloat : t -> float
-      val from_unixfloat : float -> t
-      val from_date : Date.t -> t
-      val to_date : t -> Date.t
-      val to_time : t -> Time.t
-      module Period :
-        sig
-          type +'a period constraint 'a = [< Period.date_field ]
-          type t = Period.date_field period
-          val empty : [< Period.date_field ] period
-          val add :
-            ([< Period.date_field > `Day `Week ] as 'a) period ->
-            'a period -> 'a period
-          val sub :
-            ([< Period.date_field > `Day `Week ] as 'a) period ->
-            'a period -> 'a period
-          val opp :
-            ([< Period.date_field > `Day `Week ] as 'a) period -> 'a period
-          val equal :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> bool
-          val compare :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> int
-          val hash : [< Period.date_field ] period -> int
-          val make : int -> int -> int -> int -> int -> second -> t
-          val lmake :
-            ?year:int ->
-            ?month:int ->
-            ?day:int ->
-            ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-          val year : int -> [< Period.date_field > `Year ] period
-          val month : int -> [< Period.date_field > `Month `Year ] period
-          val week : int -> [< Period.date_field > `Day `Week ] period
-          val day : int -> [< Period.date_field > `Day `Week ] period
-          val hour : int -> [< Period.date_field > `Day `Week ] period
-          val minute : int -> [< Period.date_field > `Day `Week ] period
-          val second : second -> [< Period.date_field > `Day `Week ] period
-          val from_date :
-            ([< Period.date_field ] as 'a) Date.Period.period -> 'a period
-          val from_time :
-            ([< Period.date_field ] as 'a) Time.Period.period -> 'a period
-          val to_date :
-            ([< Date.field ] as 'a) period -> 'Date.Period.period
-          exception Not_computable
-          val to_time :
-            ([< Period.date_field ] as 'a) period -> 'Time.Period.period
-          val safe_to_time :
-            ([< `Day | `Week ] as 'a) period -> 'Time.Period.period
-          val ymds :
-            [< Period.date_field ] period -> int * int * int * second
-        end
-      val add : t -> [< Period.date_field ] Period.period -> t
-      val sub : t -> t -> [< Period.date_field > `Day `Week ] Period.period
-      val precise_sub : t -> t -> Period.t
-      val rem : t -> [< Period.date_field ] Period.period -> t
-      val next : t -> field -> t
-      val prev : t -> field -> t
-    end
-end
\ No newline at end of file diff --git a/doc/type_Ftime.html b/doc/type_Ftime.html deleted file mode 100644 index 7dd794b..0000000 --- a/doc/type_Ftime.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Ftime - - -sig
-  type t
-  type field = [ `Hour | `Minute | `Second ]
-  type second = float
-  module Second :
-    sig
-      type t = second
-      val from_int : int -> t
-      val from_float : float -> t
-      val to_int : t -> int
-      val to_float : t -> float
-    end
-  val make : int -> int -> second -> t
-  val lmake : ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-  val now : unit -> t
-  val midnight : unit -> t
-  val midday : unit -> t
-  val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-  val from_gmt : t -> t
-  val to_gmt : t -> t
-  val normalize : t -> t * int
-  val hour : t -> int
-  val minute : t -> int
-  val second : t -> second
-  val to_seconds : t -> second
-  val to_minutes : t -> float
-  val to_hours : t -> float
-  val equal : t -> t -> bool
-  val compare : t -> t -> int
-  val hash : t -> int
-  val is_pm : t -> bool
-  val is_am : t -> bool
-  val from_seconds : second -> t
-  val from_minutes : float -> t
-  val from_hours : float -> t
-  module Period :
-    sig
-      type +'a period constraint 'a = [< Period.date_field ]
-      type t = Period.date_field period
-      val empty : [< Period.date_field ] period
-      val add :
-        ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-      val sub :
-        ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-      val opp : ([< Period.date_field ] as 'a) period -> 'a period
-      val equal :
-        [< Period.date_field ] period ->
-        [< Period.date_field ] period -> bool
-      val compare :
-        [< Period.date_field ] period -> [< Period.date_field ] period -> int
-      val hash : [< Period.date_field ] period -> int
-      val length : [< Period.date_field ] period -> second
-      val mul :
-        ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-      val div :
-        ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-      val make : int -> int -> second -> [< Period.date_field ] period
-      val lmake :
-        ?hour:int ->
-        ?minute:int ->
-        ?second:second -> unit -> [< Period.date_field ] period
-      val hour : int -> [< Period.date_field ] period
-      val minute : int -> [< Period.date_field ] period
-      val second : second -> [< Period.date_field ] period
-      val to_seconds : [< Period.date_field ] period -> second
-      val to_minutes : [< Period.date_field ] period -> float
-      val to_hours : [< Period.date_field ] period -> float
-    end
-  val add : t -> [< Period.date_field ] Period.period -> t
-  val sub : t -> t -> [< Period.date_field ] Period.period
-  val rem : t -> [< Period.date_field ] Period.period -> t
-  val next : t -> field -> t
-  val prev : t -> field -> t
-end
\ No newline at end of file diff --git a/doc/type_Period.S.html b/doc/type_Period.S.html deleted file mode 100644 index dc232b2..0000000 --- a/doc/type_Period.S.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Period.S - - -sig
-  type +'a period constraint 'a = [< Period.date_field ]
-  type t = Period.date_field Period.S.period
-  val empty : [< Period.date_field ] Period.S.period
-  val add :
-    ([< Period.date_field ] as 'a) Period.S.period ->
-    'Period.S.period -> 'Period.S.period
-  val sub :
-    ([< Period.date_field ] as 'a) Period.S.period ->
-    'Period.S.period -> 'Period.S.period
-  val opp :
-    ([< Period.date_field ] as 'a) Period.S.period -> 'Period.S.period
-  val equal :
-    [< Period.date_field ] Period.S.period ->
-    [< Period.date_field ] Period.S.period -> bool
-  val compare :
-    [< Period.date_field ] Period.S.period ->
-    [< Period.date_field ] Period.S.period -> int
-  val hash : [< Period.date_field ] Period.S.period -> int
-end
\ No newline at end of file diff --git a/doc/type_Period.html b/doc/type_Period.html deleted file mode 100644 index cf5f6ae..0000000 --- a/doc/type_Period.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Period - - -sig
-  type date_field = [ `Day | `Month | `Week | `Year ]
-  module type S =
-    sig
-      type +'a period constraint 'a = [< Period.date_field ]
-      type t = Period.date_field Period.S.period
-      val empty : [< Period.date_field ] Period.S.period
-      val add :
-        ([< Period.date_field ] as 'a) Period.S.period ->
-        'Period.S.period -> 'Period.S.period
-      val sub :
-        ([< Period.date_field ] as 'a) Period.S.period ->
-        'Period.S.period -> 'Period.S.period
-      val opp :
-        ([< Period.date_field ] as 'a) Period.S.period -> 'Period.S.period
-      val equal :
-        [< Period.date_field ] Period.S.period ->
-        [< Period.date_field ] Period.S.period -> bool
-      val compare :
-        [< Period.date_field ] Period.S.period ->
-        [< Period.date_field ] Period.S.period -> int
-      val hash : [< Period.date_field ] Period.S.period -> int
-    end
-end
\ No newline at end of file diff --git a/doc/type_Printer.Calendar.html b/doc/type_Printer.Calendar.html deleted file mode 100644 index 206e040..0000000 --- a/doc/type_Printer.Calendar.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Printer.Calendar - - -sig
-  type t = Calendar.t
-  val fprint : string -> Format.formatter -> t -> unit
-  val print : string -> t -> unit
-  val dprint : t -> unit
-  val sprint : string -> t -> string
-  val to_string : t -> string
-  val from_fstring : string -> string -> t
-  val from_string : string -> t
-end
\ No newline at end of file diff --git a/doc/type_Printer.CalendarPrinter.html b/doc/type_Printer.CalendarPrinter.html deleted file mode 100644 index 9b368a7..0000000 --- a/doc/type_Printer.CalendarPrinter.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Printer.CalendarPrinter - - -sig
-  type t = Calendar.t
-  val fprint : string -> Format.formatter -> t -> unit
-  val print : string -> t -> unit
-  val dprint : t -> unit
-  val sprint : string -> t -> string
-  val to_string : t -> string
-  val from_fstring : string -> string -> t
-  val from_string : string -> t
-end
\ No newline at end of file diff --git a/doc/type_Printer.Date.html b/doc/type_Printer.Date.html deleted file mode 100644 index 0c3e5d9..0000000 --- a/doc/type_Printer.Date.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Printer.Date - - -sig
-  type t = Date.t
-  val fprint : string -> Format.formatter -> t -> unit
-  val print : string -> t -> unit
-  val dprint : t -> unit
-  val sprint : string -> t -> string
-  val to_string : t -> string
-  val from_fstring : string -> string -> t
-  val from_string : string -> t
-end
\ No newline at end of file diff --git a/doc/type_Printer.DatePrinter.html b/doc/type_Printer.DatePrinter.html deleted file mode 100644 index ed37ae4..0000000 --- a/doc/type_Printer.DatePrinter.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Printer.DatePrinter - - -sig
-  type t = Date.t
-  val fprint : string -> Format.formatter -> t -> unit
-  val print : string -> t -> unit
-  val dprint : t -> unit
-  val sprint : string -> t -> string
-  val to_string : t -> string
-  val from_fstring : string -> string -> t
-  val from_string : string -> t
-end
\ No newline at end of file diff --git a/doc/type_Printer.Fcalendar.html b/doc/type_Printer.Fcalendar.html deleted file mode 100644 index ddc08fa..0000000 --- a/doc/type_Printer.Fcalendar.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Printer.Fcalendar - - -sig
-  type t = Fcalendar.t
-  val fprint : string -> Format.formatter -> t -> unit
-  val print : string -> t -> unit
-  val dprint : t -> unit
-  val sprint : string -> t -> string
-  val to_string : t -> string
-  val from_fstring : string -> string -> t
-  val from_string : string -> t
-end
\ No newline at end of file diff --git a/doc/type_Printer.Ftime.html b/doc/type_Printer.Ftime.html deleted file mode 100644 index 99089ca..0000000 --- a/doc/type_Printer.Ftime.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Printer.Ftime - - -sig
-  type t = Ftime.t
-  val fprint : string -> Format.formatter -> t -> unit
-  val print : string -> t -> unit
-  val dprint : t -> unit
-  val sprint : string -> t -> string
-  val to_string : t -> string
-  val from_fstring : string -> string -> t
-  val from_string : string -> t
-end
\ No newline at end of file diff --git a/doc/type_Printer.Precise_Calendar.html b/doc/type_Printer.Precise_Calendar.html deleted file mode 100644 index e3f05c4..0000000 --- a/doc/type_Printer.Precise_Calendar.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Printer.Precise_Calendar - - -sig
-  type t = Calendar.Precise.t
-  val fprint : string -> Format.formatter -> t -> unit
-  val print : string -> t -> unit
-  val dprint : t -> unit
-  val sprint : string -> t -> string
-  val to_string : t -> string
-  val from_fstring : string -> string -> t
-  val from_string : string -> t
-end
\ No newline at end of file diff --git a/doc/type_Printer.Precise_Fcalendar.html b/doc/type_Printer.Precise_Fcalendar.html deleted file mode 100644 index 7b5af27..0000000 --- a/doc/type_Printer.Precise_Fcalendar.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Printer.Precise_Fcalendar - - -sig
-  type t = Fcalendar.Precise.t
-  val fprint : string -> Format.formatter -> t -> unit
-  val print : string -> t -> unit
-  val dprint : t -> unit
-  val sprint : string -> t -> string
-  val to_string : t -> string
-  val from_fstring : string -> string -> t
-  val from_string : string -> t
-end
\ No newline at end of file diff --git a/doc/type_Printer.S.html b/doc/type_Printer.S.html deleted file mode 100644 index a04ad71..0000000 --- a/doc/type_Printer.S.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Printer.S - - -sig
-  type t
-  val fprint : string -> Format.formatter -> Printer.S.t -> unit
-  val print : string -> Printer.S.t -> unit
-  val dprint : Printer.S.t -> unit
-  val sprint : string -> Printer.S.t -> string
-  val to_string : Printer.S.t -> string
-  val from_fstring : string -> string -> Printer.S.t
-  val from_string : string -> Printer.S.t
-end
\ No newline at end of file diff --git a/doc/type_Printer.Time.html b/doc/type_Printer.Time.html deleted file mode 100644 index 2900abd..0000000 --- a/doc/type_Printer.Time.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Printer.Time - - -sig
-  type t = Time.t
-  val fprint : string -> Format.formatter -> t -> unit
-  val print : string -> t -> unit
-  val dprint : t -> unit
-  val sprint : string -> t -> string
-  val to_string : t -> string
-  val from_fstring : string -> string -> t
-  val from_string : string -> t
-end
\ No newline at end of file diff --git a/doc/type_Printer.TimePrinter.html b/doc/type_Printer.TimePrinter.html deleted file mode 100644 index 7870d5f..0000000 --- a/doc/type_Printer.TimePrinter.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Printer.TimePrinter - - -sig
-  type t = Time.t
-  val fprint : string -> Format.formatter -> t -> unit
-  val print : string -> t -> unit
-  val dprint : t -> unit
-  val sprint : string -> t -> string
-  val to_string : t -> string
-  val from_fstring : string -> string -> t
-  val from_string : string -> t
-end
\ No newline at end of file diff --git a/doc/type_Printer.html b/doc/type_Printer.html deleted file mode 100644 index e1b7675..0000000 --- a/doc/type_Printer.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Printer - - -sig
-  val day_name : (Date.day -> string) Pervasives.ref
-  val name_of_day : Date.day -> string
-  val short_name_of_day : Date.day -> string
-  val month_name : (Date.month -> string) Pervasives.ref
-  val name_of_month : Date.month -> string
-  val short_name_of_month : Date.month -> string
-  val set_word_regexp : Str.regexp -> unit
-  module type S =
-    sig
-      type t
-      val fprint : string -> Format.formatter -> Printer.S.t -> unit
-      val print : string -> Printer.S.t -> unit
-      val dprint : Printer.S.t -> unit
-      val sprint : string -> Printer.S.t -> string
-      val to_string : Printer.S.t -> string
-      val from_fstring : string -> string -> Printer.S.t
-      val from_string : string -> Printer.S.t
-    end
-  module Date :
-    sig
-      type t = Date.t
-      val fprint : string -> Format.formatter -> t -> unit
-      val print : string -> t -> unit
-      val dprint : t -> unit
-      val sprint : string -> t -> string
-      val to_string : t -> string
-      val from_fstring : string -> string -> t
-      val from_string : string -> t
-    end
-  module DatePrinter :
-    sig
-      type t = Date.t
-      val fprint : string -> Format.formatter -> t -> unit
-      val print : string -> t -> unit
-      val dprint : t -> unit
-      val sprint : string -> t -> string
-      val to_string : t -> string
-      val from_fstring : string -> string -> t
-      val from_string : string -> t
-    end
-  module Time :
-    sig
-      type t = Time.t
-      val fprint : string -> Format.formatter -> t -> unit
-      val print : string -> t -> unit
-      val dprint : t -> unit
-      val sprint : string -> t -> string
-      val to_string : t -> string
-      val from_fstring : string -> string -> t
-      val from_string : string -> t
-    end
-  module TimePrinter :
-    sig
-      type t = Time.t
-      val fprint : string -> Format.formatter -> t -> unit
-      val print : string -> t -> unit
-      val dprint : t -> unit
-      val sprint : string -> t -> string
-      val to_string : t -> string
-      val from_fstring : string -> string -> t
-      val from_string : string -> t
-    end
-  module Ftime :
-    sig
-      type t = Ftime.t
-      val fprint : string -> Format.formatter -> t -> unit
-      val print : string -> t -> unit
-      val dprint : t -> unit
-      val sprint : string -> t -> string
-      val to_string : t -> string
-      val from_fstring : string -> string -> t
-      val from_string : string -> t
-    end
-  module Precise_Calendar :
-    sig
-      type t = Calendar.Precise.t
-      val fprint : string -> Format.formatter -> t -> unit
-      val print : string -> t -> unit
-      val dprint : t -> unit
-      val sprint : string -> t -> string
-      val to_string : t -> string
-      val from_fstring : string -> string -> t
-      val from_string : string -> t
-    end
-  module Calendar :
-    sig
-      type t = Calendar.t
-      val fprint : string -> Format.formatter -> t -> unit
-      val print : string -> t -> unit
-      val dprint : t -> unit
-      val sprint : string -> t -> string
-      val to_string : t -> string
-      val from_fstring : string -> string -> t
-      val from_string : string -> t
-    end
-  module CalendarPrinter :
-    sig
-      type t = Calendar.t
-      val fprint : string -> Format.formatter -> t -> unit
-      val print : string -> t -> unit
-      val dprint : t -> unit
-      val sprint : string -> t -> string
-      val to_string : t -> string
-      val from_fstring : string -> string -> t
-      val from_string : string -> t
-    end
-  module Precise_Fcalendar :
-    sig
-      type t = Fcalendar.Precise.t
-      val fprint : string -> Format.formatter -> t -> unit
-      val print : string -> t -> unit
-      val dprint : t -> unit
-      val sprint : string -> t -> string
-      val to_string : t -> string
-      val from_fstring : string -> string -> t
-      val from_string : string -> t
-    end
-  module Fcalendar :
-    sig
-      type t = Fcalendar.t
-      val fprint : string -> Format.formatter -> t -> unit
-      val print : string -> t -> unit
-      val dprint : t -> unit
-      val sprint : string -> t -> string
-      val to_string : t -> string
-      val from_fstring : string -> string -> t
-      val from_string : string -> t
-    end
-end
\ No newline at end of file diff --git a/doc/type_Time.html b/doc/type_Time.html deleted file mode 100644 index 4cb5109..0000000 --- a/doc/type_Time.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Time - - -sig
-  type t
-  type field = [ `Hour | `Minute | `Second ]
-  type second = int
-  module Second :
-    sig
-      type t = second
-      val from_int : int -> t
-      val from_float : float -> t
-      val to_int : t -> int
-      val to_float : t -> float
-    end
-  val make : int -> int -> second -> t
-  val lmake : ?hour:int -> ?minute:int -> ?second:second -> unit -> t
-  val now : unit -> t
-  val midnight : unit -> t
-  val midday : unit -> t
-  val convert : t -> Time_Zone.t -> Time_Zone.t -> t
-  val from_gmt : t -> t
-  val to_gmt : t -> t
-  val normalize : t -> t * int
-  val hour : t -> int
-  val minute : t -> int
-  val second : t -> second
-  val to_seconds : t -> second
-  val to_minutes : t -> float
-  val to_hours : t -> float
-  val equal : t -> t -> bool
-  val compare : t -> t -> int
-  val hash : t -> int
-  val is_pm : t -> bool
-  val is_am : t -> bool
-  val from_seconds : second -> t
-  val from_minutes : float -> t
-  val from_hours : float -> t
-  module Period :
-    sig
-      type +'a period constraint 'a = [< Period.date_field ]
-      type t = Period.date_field period
-      val empty : [< Period.date_field ] period
-      val add :
-        ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-      val sub :
-        ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-      val opp : ([< Period.date_field ] as 'a) period -> 'a period
-      val equal :
-        [< Period.date_field ] period ->
-        [< Period.date_field ] period -> bool
-      val compare :
-        [< Period.date_field ] period -> [< Period.date_field ] period -> int
-      val hash : [< Period.date_field ] period -> int
-      val length : [< Period.date_field ] period -> second
-      val mul :
-        ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-      val div :
-        ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-      val make : int -> int -> second -> [< Period.date_field ] period
-      val lmake :
-        ?hour:int ->
-        ?minute:int ->
-        ?second:second -> unit -> [< Period.date_field ] period
-      val hour : int -> [< Period.date_field ] period
-      val minute : int -> [< Period.date_field ] period
-      val second : second -> [< Period.date_field ] period
-      val to_seconds : [< Period.date_field ] period -> second
-      val to_minutes : [< Period.date_field ] period -> float
-      val to_hours : [< Period.date_field ] period -> float
-    end
-  val add : t -> [< Period.date_field ] Period.period -> t
-  val sub : t -> t -> [< Period.date_field ] Period.period
-  val rem : t -> [< Period.date_field ] Period.period -> t
-  val next : t -> field -> t
-  val prev : t -> field -> t
-end
\ No newline at end of file diff --git a/doc/type_Time_Zone.html b/doc/type_Time_Zone.html deleted file mode 100644 index 4c32a2c..0000000 --- a/doc/type_Time_Zone.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Time_Zone - - -sig
-  type t = UTC | Local | UTC_Plus of int
-  val current : unit -> Time_Zone.t
-  val change : Time_Zone.t -> unit
-  val gap : Time_Zone.t -> Time_Zone.t -> int
-  val from_gmt : unit -> int
-  val to_gmt : unit -> int
-  val is_dst : unit -> bool
-  val hour_of_dst : unit -> int
-  val on : ('-> 'b) -> Time_Zone.t -> '-> 'b
-end
\ No newline at end of file diff --git a/doc/type_Time_sig.S.Period.html b/doc/type_Time_sig.S.Period.html deleted file mode 100644 index ae0badb..0000000 --- a/doc/type_Time_sig.S.Period.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Time_sig.S.Period - - -sig
-  type +'a period constraint 'a = [< Period.date_field ]
-  type t = Period.date_field period
-  val empty : [< Period.date_field ] period
-  val add : ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-  val sub : ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-  val opp : ([< Period.date_field ] as 'a) period -> 'a period
-  val equal :
-    [< Period.date_field ] period -> [< Period.date_field ] period -> bool
-  val compare :
-    [< Period.date_field ] period -> [< Period.date_field ] period -> int
-  val hash : [< Period.date_field ] period -> int
-  val length : [< Period.date_field ] period -> Time_sig.S.second
-  val mul : ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-  val div : ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-  val make : int -> int -> Time_sig.S.second -> [< Period.date_field ] period
-  val lmake :
-    ?hour:int ->
-    ?minute:int ->
-    ?second:Time_sig.S.second -> unit -> [< Period.date_field ] period
-  val hour : int -> [< Period.date_field ] period
-  val minute : int -> [< Period.date_field ] period
-  val second : Time_sig.S.second -> [< Period.date_field ] period
-  val to_seconds : [< Period.date_field ] period -> Time_sig.S.second
-  val to_minutes : [< Period.date_field ] period -> float
-  val to_hours : [< Period.date_field ] period -> float
-end
\ No newline at end of file diff --git a/doc/type_Time_sig.S.Second.html b/doc/type_Time_sig.S.Second.html deleted file mode 100644 index 50ce849..0000000 --- a/doc/type_Time_sig.S.Second.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Time_sig.S.Second - - -sig
-  type t = second
-  val from_int : int -> t
-  val from_float : float -> t
-  val to_int : t -> int
-  val to_float : t -> float
-end
\ No newline at end of file diff --git a/doc/type_Time_sig.S.html b/doc/type_Time_sig.S.html deleted file mode 100644 index 4ae96eb..0000000 --- a/doc/type_Time_sig.S.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Time_sig.S - - -sig
-  type t
-  type field = [ `Hour | `Minute | `Second ]
-  type second
-  module Second :
-    sig
-      type t = second
-      val from_int : int -> t
-      val from_float : float -> t
-      val to_int : t -> int
-      val to_float : t -> float
-    end
-  val make : int -> int -> Time_sig.S.second -> Time_sig.S.t
-  val lmake :
-    ?hour:int ->
-    ?minute:int -> ?second:Time_sig.S.second -> unit -> Time_sig.S.t
-  val now : unit -> Time_sig.S.t
-  val midnight : unit -> Time_sig.S.t
-  val midday : unit -> Time_sig.S.t
-  val convert : Time_sig.S.t -> Time_Zone.t -> Time_Zone.t -> Time_sig.S.t
-  val from_gmt : Time_sig.S.t -> Time_sig.S.t
-  val to_gmt : Time_sig.S.t -> Time_sig.S.t
-  val normalize : Time_sig.S.t -> Time_sig.S.t * int
-  val hour : Time_sig.S.t -> int
-  val minute : Time_sig.S.t -> int
-  val second : Time_sig.S.t -> Time_sig.S.second
-  val to_seconds : Time_sig.S.t -> Time_sig.S.second
-  val to_minutes : Time_sig.S.t -> float
-  val to_hours : Time_sig.S.t -> float
-  val equal : Time_sig.S.t -> Time_sig.S.t -> bool
-  val compare : Time_sig.S.t -> Time_sig.S.t -> int
-  val hash : Time_sig.S.t -> int
-  val is_pm : Time_sig.S.t -> bool
-  val is_am : Time_sig.S.t -> bool
-  val from_seconds : Time_sig.S.second -> Time_sig.S.t
-  val from_minutes : float -> Time_sig.S.t
-  val from_hours : float -> Time_sig.S.t
-  module Period :
-    sig
-      type +'a period constraint 'a = [< Period.date_field ]
-      type t = Period.date_field period
-      val empty : [< Period.date_field ] period
-      val add :
-        ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-      val sub :
-        ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-      val opp : ([< Period.date_field ] as 'a) period -> 'a period
-      val equal :
-        [< Period.date_field ] period ->
-        [< Period.date_field ] period -> bool
-      val compare :
-        [< Period.date_field ] period -> [< Period.date_field ] period -> int
-      val hash : [< Period.date_field ] period -> int
-      val length : [< Period.date_field ] period -> Time_sig.S.second
-      val mul :
-        ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-      val div :
-        ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-      val make :
-        int -> int -> Time_sig.S.second -> [< Period.date_field ] period
-      val lmake :
-        ?hour:int ->
-        ?minute:int ->
-        ?second:Time_sig.S.second -> unit -> [< Period.date_field ] period
-      val hour : int -> [< Period.date_field ] period
-      val minute : int -> [< Period.date_field ] period
-      val second : Time_sig.S.second -> [< Period.date_field ] period
-      val to_seconds : [< Period.date_field ] period -> Time_sig.S.second
-      val to_minutes : [< Period.date_field ] period -> float
-      val to_hours : [< Period.date_field ] period -> float
-    end
-  val add :
-    Time_sig.S.t ->
-    [< Period.date_field ] Time_sig.S.Period.period -> Time_sig.S.t
-  val sub :
-    Time_sig.S.t ->
-    Time_sig.S.t -> [< Period.date_field ] Time_sig.S.Period.period
-  val rem :
-    Time_sig.S.t ->
-    [< Period.date_field ] Time_sig.S.Period.period -> Time_sig.S.t
-  val next : Time_sig.S.t -> Time_sig.S.field -> Time_sig.S.t
-  val prev : Time_sig.S.t -> Time_sig.S.field -> Time_sig.S.t
-end
\ No newline at end of file diff --git a/doc/type_Time_sig.Second.html b/doc/type_Time_sig.Second.html deleted file mode 100644 index c4643db..0000000 --- a/doc/type_Time_sig.Second.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Time_sig.Second - - -sig
-  type t
-  val from_int : int -> Time_sig.Second.t
-  val from_float : float -> Time_sig.Second.t
-  val to_int : Time_sig.Second.t -> int
-  val to_float : Time_sig.Second.t -> float
-end
\ No newline at end of file diff --git a/doc/type_Time_sig.html b/doc/type_Time_sig.html deleted file mode 100644 index 811deda..0000000 --- a/doc/type_Time_sig.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Time_sig - - -sig
-  module type Second =
-    sig
-      type t
-      val from_int : int -> Time_sig.Second.t
-      val from_float : float -> Time_sig.Second.t
-      val to_int : Time_sig.Second.t -> int
-      val to_float : Time_sig.Second.t -> float
-    end
-  module type S =
-    sig
-      type t
-      type field = [ `Hour | `Minute | `Second ]
-      type second
-      module Second :
-        sig
-          type t = second
-          val from_int : int -> t
-          val from_float : float -> t
-          val to_int : t -> int
-          val to_float : t -> float
-        end
-      val make : int -> int -> Time_sig.S.second -> Time_sig.S.t
-      val lmake :
-        ?hour:int ->
-        ?minute:int -> ?second:Time_sig.S.second -> unit -> Time_sig.S.t
-      val now : unit -> Time_sig.S.t
-      val midnight : unit -> Time_sig.S.t
-      val midday : unit -> Time_sig.S.t
-      val convert :
-        Time_sig.S.t -> Time_Zone.t -> Time_Zone.t -> Time_sig.S.t
-      val from_gmt : Time_sig.S.t -> Time_sig.S.t
-      val to_gmt : Time_sig.S.t -> Time_sig.S.t
-      val normalize : Time_sig.S.t -> Time_sig.S.t * int
-      val hour : Time_sig.S.t -> int
-      val minute : Time_sig.S.t -> int
-      val second : Time_sig.S.t -> Time_sig.S.second
-      val to_seconds : Time_sig.S.t -> Time_sig.S.second
-      val to_minutes : Time_sig.S.t -> float
-      val to_hours : Time_sig.S.t -> float
-      val equal : Time_sig.S.t -> Time_sig.S.t -> bool
-      val compare : Time_sig.S.t -> Time_sig.S.t -> int
-      val hash : Time_sig.S.t -> int
-      val is_pm : Time_sig.S.t -> bool
-      val is_am : Time_sig.S.t -> bool
-      val from_seconds : Time_sig.S.second -> Time_sig.S.t
-      val from_minutes : float -> Time_sig.S.t
-      val from_hours : float -> Time_sig.S.t
-      module Period :
-        sig
-          type +'a period constraint 'a = [< Period.date_field ]
-          type t = Period.date_field period
-          val empty : [< Period.date_field ] period
-          val add :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val sub :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val opp : ([< Period.date_field ] as 'a) period -> 'a period
-          val equal :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> bool
-          val compare :
-            [< Period.date_field ] period ->
-            [< Period.date_field ] period -> int
-          val hash : [< Period.date_field ] period -> int
-          val length : [< Period.date_field ] period -> Time_sig.S.second
-          val mul :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val div :
-            ([< Period.date_field ] as 'a) period -> 'a period -> 'a period
-          val make :
-            int -> int -> Time_sig.S.second -> [< Period.date_field ] period
-          val lmake :
-            ?hour:int ->
-            ?minute:int ->
-            ?second:Time_sig.S.second ->
-            unit -> [< Period.date_field ] period
-          val hour : int -> [< Period.date_field ] period
-          val minute : int -> [< Period.date_field ] period
-          val second : Time_sig.S.second -> [< Period.date_field ] period
-          val to_seconds : [< Period.date_field ] period -> Time_sig.S.second
-          val to_minutes : [< Period.date_field ] period -> float
-          val to_hours : [< Period.date_field ] period -> float
-        end
-      val add :
-        Time_sig.S.t ->
-        [< Period.date_field ] Time_sig.S.Period.period -> Time_sig.S.t
-      val sub :
-        Time_sig.S.t ->
-        Time_sig.S.t -> [< Period.date_field ] Time_sig.S.Period.period
-      val rem :
-        Time_sig.S.t ->
-        [< Period.date_field ] Time_sig.S.Period.period -> Time_sig.S.t
-      val next : Time_sig.S.t -> Time_sig.S.field -> Time_sig.S.t
-      val prev : Time_sig.S.t -> Time_sig.S.field -> Time_sig.S.t
-    end
-end
\ No newline at end of file diff --git a/doc/type_Utils.Comparable.html b/doc/type_Utils.Comparable.html deleted file mode 100644 index 45217ae..0000000 --- a/doc/type_Utils.Comparable.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Utils.Comparable - - -sig
-  type t
-  val equal : Utils.Comparable.t -> Utils.Comparable.t -> bool
-  val compare : Utils.Comparable.t -> Utils.Comparable.t -> int
-  val hash : Utils.Comparable.t -> int
-end
\ No newline at end of file diff --git a/doc/type_Utils.Float.html b/doc/type_Utils.Float.html deleted file mode 100644 index f37c14a..0000000 --- a/doc/type_Utils.Float.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Utils.Float - - -sig
-  type t = float
-  val equal : t -> t -> bool
-  val compare : t -> t -> int
-  val hash : t -> int
-  val set_precision : float -> unit
-  val round : t -> int
-end
\ No newline at end of file diff --git a/doc/type_Utils.Int.html b/doc/type_Utils.Int.html deleted file mode 100644 index 8b631c8..0000000 --- a/doc/type_Utils.Int.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Utils.Int - - -sig
-  type t = int
-  val equal : t -> t -> bool
-  val compare : t -> t -> int
-  val hash : t -> int
-end
\ No newline at end of file diff --git a/doc/type_Utils.html b/doc/type_Utils.html deleted file mode 100644 index 1c55e5a..0000000 --- a/doc/type_Utils.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Utils - - -sig
-  module type Comparable =
-    sig
-      type t
-      val equal : Utils.Comparable.t -> Utils.Comparable.t -> bool
-      val compare : Utils.Comparable.t -> Utils.Comparable.t -> int
-      val hash : Utils.Comparable.t -> int
-    end
-  module Int :
-    sig
-      type t = int
-      val equal : t -> t -> bool
-      val compare : t -> t -> int
-      val hash : t -> int
-    end
-  module Float :
-    sig
-      type t = float
-      val equal : t -> t -> bool
-      val compare : t -> t -> int
-      val hash : t -> int
-      val set_precision : float -> unit
-      val round : t -> int
-    end
-end
\ No newline at end of file diff --git a/doc/type_Version.html b/doc/type_Version.html deleted file mode 100644 index 2680608..0000000 --- a/doc/type_Version.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -Version - - -sig val version : string val date : string end \ No newline at end of file diff --git a/dune-project b/dune-project new file mode 100644 index 0000000..7b1c2ce --- /dev/null +++ b/dune-project @@ -0,0 +1,3 @@ +(lang dune 1.0) +(name calendar) +(version 3.0.0) diff --git a/src/date.ml b/src/date.ml index d59cea1..ed64587 100644 --- a/src/date.ml +++ b/src/date.ml @@ -65,12 +65,21 @@ external int_of_month : month -> int = "%identity" let compare = Utils.Int.compare let equal = Utils.Int.equal +let ( > ) x y = compare x y = 1 +let ( >= ) x y = compare x y > -1 +let ( < ) x y = compare x y = -1 +let ( <= ) x y = compare x y < 1 +let ( ) c (ord, x, y) = + if c = 0 then ord x y else c +let cmp_date (y1, m1, d1) (y2, m2, d2) = + compare y1 y2 (compare, m1, m2) (compare, d1, d2) + + let hash = Utils.Int.hash (* Constructors. *) -let lt (d1 : int * int * int) (d2 : int * int * int) = - Pervasives.compare d1 d2 < 0 +let lt d1 d2 = (cmp_date d1 d2) < 0 (* [date_ok] returns [true] is the date belongs to the Julian period; [false] otherwise. *) @@ -251,8 +260,8 @@ module Period = struct (* exactly equivalent to [Pervasives.compare] but more flexible typing *) let compare x y = - let n = Pervasives.compare x.m y.m in - if n = 0 then Pervasives.compare x.d y.d else n + let n = compare x.m y.m in + if n = 0 then compare x.d y.d else n let equal x y = compare x y = 0 let hash = Hashtbl.hash @@ -337,7 +346,7 @@ let weeks_in_year y = | _ -> 52 let week_first_last w y = - let d = make y 1 1 in + let d = make y 1 4 in (* January 4th must be in the first week (ISO 8601) *) let d = d - d mod 7 in let b = d + 7 * (w - 1) in b, 6 + b diff --git a/src/date_sig.mli b/src/date_sig.mli index 0e75243..1f62524 100644 --- a/src/date_sig.mli +++ b/src/date_sig.mli @@ -176,6 +176,18 @@ module type S = sig (** Comparison function between two dates. @see Utils.Comparable.compare *) + val ( > ) : 'a date -> 'b date -> bool + (** Check if the first date is later than the second *) + + val ( >= ) : 'a date -> 'b date -> bool + (** Check if the first date is later or equal to the second *) + + val ( < ) : 'a date -> 'b date -> bool + (** Check if the first date is earlier than the second *) + + val ( <= ) : 'a date -> 'b date -> bool + (** Check if the first date is earlier or equal to the second *) + val hash: 'a date -> int (** Hash function for dates. @see Utils.Comparable.hash diff --git a/src/dune b/src/dune new file mode 100644 index 0000000..e0e74b7 --- /dev/null +++ b/src/dune @@ -0,0 +1,14 @@ + +(library + (name calendarLib) + (public_name calendar) + (libraries re unix) + (modules_without_implementation calendar_sig date_sig period time_sig) + (flags :standard -warn-error -32 -safe-string)) + +(rule + (targets version.ml) + (action + (with-stdout-to %{targets} + (echo "let version = String.trim \"" %{version:calendar} "\"\n")))) + diff --git a/src/printer.ml b/src/printer.ml index 32c1f2d..aa1614b 100644 --- a/src/printer.ml +++ b/src/printer.ml @@ -121,7 +121,7 @@ let gen_day_of_name f fmt name = let day_of_name = gen_day_of_name name_of_day "%a" let day_of_short_name = gen_day_of_name short_name_of_day "%A" -let word_regexp = ref (Str.regexp "[a-zA-Z]+") +let word_regexp = ref (Re.Str.regexp "[a-zA-Z]+") let set_word_regexp r = word_regexp := r @@ -181,7 +181,7 @@ struct let print_int pad k n = print_number fmt pad k (Lazy.force n) in let print_string pad s = let pad s = match pad with - | Uppercase -> String.uppercase s + | Uppercase -> String.uppercase_ascii s | Empty | Zero | Blank -> s in Format.pp_print_string fmt (pad (Lazy.force s)) @@ -236,7 +236,7 @@ struct | 'n' -> print_char '\n' | 'p' -> print_string pad apm | 'P' -> - Format.pp_print_string fmt (String.lowercase (Lazy.force apm)) + Format.pp_print_string fmt (String.lowercase_ascii (Lazy.force apm)) | 'r' -> print_time pad shour; print_char ' '; @@ -259,10 +259,10 @@ struct print_number fmt Zero 10 0 | ':' -> let idx = - try Str.search_forward (Str.regexp "z\\|:z\\|::z") f (i+1) + try Re.Str.search_forward (Re.Str.regexp "z\\|:z\\|::z") f (i+1) with Not_found -> bad_format f in - let next = Str.matched_string f in + let next = Re.Str.matched_string f in if idx <> i+1 then bad_format f; if Lazy.force tz >= 0 then print_char '+'; print_int pad 10 tz; @@ -352,15 +352,15 @@ struct in let read_word ?(regexp=(!word_regexp)) () = let jn = - try Str.search_forward regexp s !j with Not_found -> not_match f s + try Re.Str.search_forward regexp s !j with Not_found -> not_match f s in if jn <> !j then not_match f s; - let w = Str.matched_string s in + let w = Re.Str.matched_string s in j := jn + String.length w; w in let read_float = - let regexp = Str.regexp "[0-9][0-9]\\(\\.[0-9]*\\)?" in + let regexp = Re.Str.regexp "[0-9][0-9]\\(\\.[0-9]*\\)?" in fun () -> try float_of_string (read_word ~regexp ()) with Failure _ -> not_match f s @@ -390,7 +390,7 @@ struct let parse_y () = year := read_number 2 + 1900 in let parse_Y () = year := read_number 4 in let parse_tz () = - let sign = match read_word ~regexp:(Str.regexp "[\\+-]") () with + let sign = match read_word ~regexp:(Re.Str.regexp "[\\+-]") () with | "+" -> -1 | "-" -> 1 | _ -> assert false diff --git a/src/printer.mli b/src/printer.mli index 49d2570..78747f9 100644 --- a/src/printer.mli +++ b/src/printer.mli @@ -125,7 +125,7 @@ val short_name_of_month : Date.month -> string [name_of_month d]. Used by the specifier [%b]. *) -val set_word_regexp: Str.regexp -> unit +val set_word_regexp: Re.Str.regexp -> unit (** Set the regular expression used to recognize words in [from_fstring]. Default is [[a-zA-Z]*]. @since 1.10 *) diff --git a/src/time_Zone.ml b/src/time_Zone.ml index 5a1fd8b..dcbad4e 100644 --- a/src/time_Zone.ml +++ b/src/time_Zone.ml @@ -44,7 +44,6 @@ let gap_gmt_local = let current () = !tz let change = function - | UTC_Plus x when out_of_bounds x -> invalid_arg "Not a valid time zone" | _ as t -> tz := t let gap t1 t2 = diff --git a/src/utils.ml b/src/utils.ml index 9cee0d4..86640d1 100644 --- a/src/utils.ml +++ b/src/utils.ml @@ -29,8 +29,8 @@ end module Int = struct type t = int - let equal = Pervasives.(=) - let compare = Pervasives.compare + let equal (a: int) b = a = b + let compare (a: int) b = compare a b let hash = Hashtbl.hash end @@ -38,7 +38,7 @@ module Float = struct type t = float - let precision = ref 1e-3 + let precision = ref 1e-8 let set_precision f = precision := f diff --git a/src/utils.mli b/src/utils.mli index 40d285b..46f0e4d 100644 --- a/src/utils.mli +++ b/src/utils.mli @@ -58,8 +58,8 @@ module Float: sig val set_precision: float -> unit (** Set the precision of [equal] and [compare] for float. If the precision is [p], then the floats [x] and [y] are equal iff - [abs(x-y) < p]. By default, the precision is [1e-3] (that is one - millisecond if floats represents seconds). *) + [abs(x-y) < p]. By default, the precision is [1e-8] (that is 0.864 + milliseconds if floats represent days). *) val round: t -> int (** Round a float to the nearest integer. *) diff --git a/src/version.mli b/src/version.mli index 82d53e9..07c6a8a 100644 --- a/src/version.mli +++ b/src/version.mli @@ -26,5 +26,3 @@ val version: string (** Name of this version. *) -val date: string - (** Date of compilation. *) diff --git a/tests/dune b/tests/dune new file mode 100644 index 0000000..b0a4ce7 --- /dev/null +++ b/tests/dune @@ -0,0 +1,9 @@ + +(executable + (name test) + (libraries calendar alcotest)) + +(alias + (name runtest) + (deps test.exe) + (action (run ./test.exe -e))) diff --git a/tests/gen_test.ml b/tests/gen_test.ml index 4c466e8..8b176af 100644 --- a/tests/gen_test.ml +++ b/tests/gen_test.ml @@ -20,7 +20,7 @@ (* LICENSE. *) (**************************************************************************) -(*i $Id: gen_test.ml 259 2014-10-29 10:00:46Z signoles $ i*) +(*i $Id$ i*) let ok_ref = ref 0 let ok () = incr ok_ref @@ -40,7 +40,6 @@ let test x s = let test_exn x s = try ignore (Lazy.force x); - Printf.printf "%s\n" s; - bug () + Alcotest.failf "expected exception: %s" s with _ -> - ok ();; + () diff --git a/tests/gen_test.mli b/tests/gen_test.mli index 64b1c6f..ba22014 100644 --- a/tests/gen_test.mli +++ b/tests/gen_test.mli @@ -20,7 +20,7 @@ (* LICENSE. *) (**************************************************************************) -(*i $Id: gen_test.mli 259 2014-10-29 10:00:46Z signoles $ i*) +(*i $Id$ i*) (* Generic functions used in the tests. *) diff --git a/tests/test.ml b/tests/test.ml index 0af8f95..1475484 100644 --- a/tests/test.ml +++ b/tests/test.ml @@ -20,25 +20,20 @@ (* LICENSE. *) (**************************************************************************) -(*i $Id: test.ml 259 2014-10-29 10:00:46Z signoles $ i*) +(*i $Id$ i*) (* Display the results *) -let ok = - Test_timezone.ok + Test_time.ok + Test_ftime.ok - + Test_date.ok + Test_calendar.ok + Test_pcalendar.ok - + Test_fcalendar.ok + Test_fpcalendar.ok - + Test_printer.ok;; +let suite = [ + "timezone", Test_timezone.suite; + "time", Test_time.suite; + "ftime", Test_ftime.suite; + "date", Test_date.suite; + "calendar", Test_calendar.suite; + "pcalendar", Test_pcalendar.suite; + "fpcalendar", Test_fpcalendar.suite; + "printer", Test_printer.suite; +] -let bug = - Test_timezone.bug + Test_time.bug + Test_ftime.bug - + Test_date.bug + Test_calendar.bug + Test_pcalendar.bug - + Test_fcalendar.bug + Test_fpcalendar.bug - + Test_printer.bug;; - -Printf.printf "\nFinal results:\n";; -Printf.printf "tests ok : %d; tests ko : %d\n" ok bug;; - -assert (bug >= 0);; - -if bug > 0 then exit 1;; +let () = + Alcotest.run "calendar tests" suite diff --git a/tests/test_calendar.ml b/tests/test_calendar.ml index 6ed1ee1..26a9d14 100644 --- a/tests/test_calendar.ml +++ b/tests/test_calendar.ml @@ -24,176 +24,174 @@ Printf.printf "Tests of Calendar:\n";; open CalendarLib;; open Calendar;; -include Gen_test;; -reset ();; - -let eps = 0.000001;; - -Time_Zone.change Time_Zone.UTC;; - -(* Calendar *) - -test_exn (lazy (make (-4712) 1 1 12 0 (-1))) "-4713-12-31-23-59-59";; -test (make (-4712) 1 1 12 0 0 = make (-4712) 1 0 36 0 0) "calendar coercion";; -test (from_jd 0. = make (-4712) 1 1 12 0 0) "from_jd 0 = 4713 BC-1-1";; -test (from_mjd 0. = make 1858 11 17 0 0 0) "from_mjd 0 = 1858-11-17";; - -test (Precise.compare (Precise.make 2009 12 14 13 49 0) (Precise.make 2009 12 14 13 49 1) < 0) - "Precise.compare 2009/12/14/13/19/0 2009/12/14/13/19/1";; - -Utils.Float.set_precision 1e-5;; -test (compare (make 2009 12 14 13 49 0) (make 2009 12 14 13 49 1) < 0) - "compare 2009/12/14/13/19/0 2009/12/14/13/19/1";; -Utils.Float.set_precision 1e-3;; - -Time_Zone.change (Time_Zone.UTC_Plus 5);; - -test (abs_float (to_jd (from_jd 12345.6789) -. 12345.6789) < eps) - "to_jd (from_jd x) = x";; -test (abs_float (to_mjd (from_mjd 12345.6789) -. 12345.6789) < eps) - "to_mjd (from_mjd x) = x";; -test (Period.to_date (Period.hour 60) = Date.Period.day 2) - "period(60h) = period(2d)";; -test (Period.compare (Period.day 2) (Period.hour 60) < 0) "Period.compare <";; -test (Period.compare (Period.day 3) (Period.hour 60) > 0) "Period.compare >";; -test (Period.compare - (Period.add (Period.day 2) (Period.hour 12)) - (Period.hour 60) = 0) "Period.compare =";; -test - (add (make 1 2 3 4 5 6) (Period.make 9 8 7 6 5 4) = make 10 10 10 10 10 10) - "add 1-2-3-4-5-6 9-8-7-6-5-4";; -test - (add (make 3 1 1 0 0 0) (Period.make 0 0 0 (-25) 0 (-1)) = - make 2 12 30 22 59 59) - "add 3-1-1-0-0-0 0-0-0-(-25)-0-(-1)";; - -test - (equal (rem (make 9 8 7 6 5 4) (Period.make 1 2 3 4 5 6)) - (make 8 6 4 1 59 58)) - "rem 9-8-7-6-5-4 1-2-3-4-5-6";; -test (Period.equal - (sub (make 0 0 7 6 5 4) (make 0 0 3 54 5 6)) - (Period.make 0 0 1 23 59 58)) - "sub 0-0-7-6-5-4 0-0-3-54-5-6";; - -test (Date.Period.ymd - (Period.to_date - (precise_sub (make 2010 10 5 0 0 0) (make 2010 6 2 0 0 0))) - = (0, 4, 3)) -"precise_sub 2010-10-5 2010-6-2";; -test (Date.Period.ymd - (Period.to_date - (precise_sub (make 2010 10 5 0 2 3) (make 2010 6 5 0 0 0))) = - (0, 4, 0)) -"precise_sub 2010-10-5 2010-6-2";; -test (Date.Period.ymd - (Period.to_date - (precise_sub (make 2010 10 5 0 32 12) (make 2010 6 6 0 31 3))) - = (0, 3, 29)) -"precise_sub 2010-10-5 2010-6-6";; -test (Date.Period.ymd - (Period.to_date - (precise_sub (make 2010 10 5 1 3 3) (make 2010 6 4 0 23 3))) = - (0, 4, 1)) -"precise_sub 2010-10-5 2010-6-4";; -test (Date.Period.ymd - (Period.to_date - (precise_sub (make 2010 1 1 0 0 0) (make 2000 1 1 0 0 0))) - = (10, 0, 0)) -"precise_sub 2010-1-1 2000-1-1";; - -test (Period.equal - (Period.opp (Period.make 0 0 2 3 0 0)) - (Period.make 0 0 (-2) (-3) 0 0)) - "period opp";; - -(* Date *) - -let d = make 2003 12 31 12 24 48;; -test (next d `Month = make 2004 1 31 12 24 48) "2003-12-31 + 1 mois";; -test (add d (Period.month 2) = make 2004 3 2 12 24 48) "2003-12-31 + 2 mois";; -let d3 = make 2011 3 24 0 0 0;; -test (prev d3 `Year = make 2010 3 24 0 0 0) "2011-3-24 - 1 year";; -let d2 = make (-3000) 1 1 6 12 24;; -test (equal (rem d (sub d d2)) d2) "rem x (sub x y) = y";; -test (is_leap_day (make 2000 2 24 0 0 0)) "2000-2-24 leap day";; -test (not (is_leap_day (make 2000 2 25 0 0 0))) "2000-2-25 not leap day";; -test (is_gregorian (make 1600 1 1 0 0 0)) "1600-1-1 gregorian";; -test (not (is_gregorian (make 1400 1 1 0 0 0))) "1400-1-1 not gregorian";; -test (is_julian (make 1582 1 1 0 0 0)) "1582-1-1 julian";; -test (not (is_julian (make 1583 1 1 0 0 0))) "1583-1-1 not julian";; - -(* Time *) - -test (let n = Unix.gmtime (Unix.time ()) in - hour (from_unixtm n) = n.Unix.tm_hour) "from_unixtm invariant UTC";; -test (let n = Unix.time () in - hour (from_unixfloat n) = (Unix.gmtime n).Unix.tm_hour) - "from_unixfloat invariant UTC";; - -Time_Zone.change (Time_Zone.UTC_Plus 10);; - -test (let n = Unix.gmtime (Unix.time ()) in - hour (from_unixtm n) = n.Unix.tm_hour) "from_unixtm invariant +10";; -test (let n = Unix.time () in - hour (from_unixfloat n) = (Unix.gmtime n).Unix.tm_hour) - "from_unixfloat invariant +10";; - -test (equal (add (make 0 0 0 10 0 0) (Period.hour 30)) (make 0 0 1 16 0 0)) - "add 0-0-0-20-0-0 30h";; -test (equal (next (make 1999 12 31 23 59 59) `Second) (make 2000 1 1 0 0 0)) - "next 1999-31-12-23-59-59 `Second";; -let n = now ();; -test (equal (prev (next n `Minute) `Minute) n) "prev next = id";; -test (equal - (convert - (make 0 0 0 23 0 0) - (Time_Zone.UTC_Plus 2) - (Time_Zone.UTC_Plus 4)) - (make 0 0 1 1 0 0)) "convert";; -test (hour (make 0 0 0 20 0 0) = 20) "hour";; -test (minute (make 0 0 0 20 10 0) = 10) "minute";; -test (second (make 0 0 0 20 10 5) = 5) "second";; -test (is_pm (make 0 0 0 10 0 0)) "is_pm 10-0-0";; -test (is_pm (make 0 0 0 34 0 0)) "is_pm 34-0-0";; -test (not (is_pm (make 0 0 0 (- 10) 0 0))) "not (is_pm (- 10) 0 0)";; -test (is_am (make 0 0 0 20 0 0)) "is_am 20-0-0";; -test (is_am (make 0 0 0 (- 34) 0 0)) "is_am (- 34) 0 0";; -test (not (is_am (make 0 0 0 34 0 0))) "not (is_pm 34 0 0)";; - -Time_Zone.change Time_Zone.UTC;; - -test (let n = Unix.gmtime (Unix.time ()) in - hour (from_unixtm n) = n.Unix.tm_hour) "from_unixtm invariant UTC2";; -test (let n = Unix.time () in - hour (from_unixfloat n) = (Unix.gmtime n).Unix.tm_hour) - "from_unixfloat invariant UTC2";; - -test (to_unixfloat (make 1970 1 1 0 0 0) = 0.) "to_unixfloat 1 Jan 1970";; -test (from_unixfloat 0. = make 1970 1 1 0 0 0) "from_unixfloat 1 Jan 1970";; -test (Utils.Float.equal (to_unixfloat (make 2004 11 13 19 17 9)) 1100373429.) - "to_unixfloat";; -test (equal (from_unixfloat 1100373429.) (make 2004 11 13 19 17 9)) - "from_unixfloat";; -test (from_unixtm (to_unixtm (make 2003 7 16 23 22 21)) = - make 2003 7 16 23 22 21) - "from_unixtm to_unixtm = id";; - -test (Period.to_time (Period.second 30) = Time.Period.second 30) - "Period.to_time second";; -test (Period.to_time (Period.day 6) = Time.Period.second 518400) - "Period.to_time day";; -test (Period.safe_to_time (Period.second 30) = Time.Period.second 30) - "Period.safe_to_time second";; -test (Period.safe_to_time (Period.day 6) = Time.Period.second 518400) - "Period.safe_to_time day";; -test_exn (lazy (Period.to_time (Period.year 1))) "Period.to_time year";; -test (Period.ymds (Period.make 1 2 3 1 2 3) = (1, 2, 3, 3723)) "Period.ymds";; -test - (Period.ymds (Period.make (-1) (-2) (-3) (-1) (-2) (-3)) = (-1,-2,-4,82677)) - "Period.ymds neg";; - -let ok = nb_ok ();; -let bug = nb_bug ();; -Printf.printf "tests ok : %d; tests ko : %d\n" ok bug;; -flush stdout;; + +let test() = + let test x s = Alcotest.(check bool) s true x in + let eps = 0.000001 in + + Time_Zone.change Time_Zone.UTC; + + (* Calendar *) + + Gen_test.test_exn (lazy (make (-4712) 1 1 12 0 (-1))) "-4713-12-31-23-59-59"; + test (make (-4712) 1 1 12 0 0 = make (-4712) 1 0 36 0 0) "calendar coercion"; + test (from_jd 0. = make (-4712) 1 1 12 0 0) "from_jd 0 = 4713 BC-1-1"; + test (from_mjd 0. = make 1858 11 17 0 0 0) "from_mjd 0 = 1858-11-17"; + + test (Precise.compare (Precise.make 2009 12 14 13 49 0) (Precise.make 2009 12 14 13 49 1) < 0) + "Precise.compare 2009/12/14/13/19/0 2009/12/14/13/19/1"; + + Utils.Float.set_precision 1e-5; + test (compare (make 2009 12 14 13 49 0) (make 2009 12 14 13 49 1) < 0) + "compare 2009/12/14/13/19/0 2009/12/14/13/19/1"; + Utils.Float.set_precision 1e-3; + + Time_Zone.change (Time_Zone.UTC_Plus 5); + + test (abs_float (to_jd (from_jd 12345.6789) -. 12345.6789) < eps) + "to_jd (from_jd x) = x"; + test (abs_float (to_mjd (from_mjd 12345.6789) -. 12345.6789) < eps) + "to_mjd (from_mjd x) = x"; + test (Period.to_date (Period.hour 60) = Date.Period.day 2) + "period(60h) = period(2d)"; + test (Period.compare (Period.day 2) (Period.hour 60) < 0) "Period.compare <"; + test (Period.compare (Period.day 3) (Period.hour 60) > 0) "Period.compare >"; + test (Period.compare + (Period.add (Period.day 2) (Period.hour 12)) + (Period.hour 60) = 0) "Period.compare ="; + test + (add (make 1 2 3 4 5 6) (Period.make 9 8 7 6 5 4) = make 10 10 10 10 10 10) + "add 1-2-3-4-5-6 9-8-7-6-5-4"; + test + (add (make 3 1 1 0 0 0) (Period.make 0 0 0 (-25) 0 (-1)) = + make 2 12 30 22 59 59) + "add 3-1-1-0-0-0 0-0-0-(-25)-0-(-1)"; + + test + (equal (rem (make 9 8 7 6 5 4) (Period.make 1 2 3 4 5 6)) + (make 8 6 4 1 59 58)) + "rem 9-8-7-6-5-4 1-2-3-4-5-6"; + test (Period.equal + (sub (make 0 0 7 6 5 4) (make 0 0 3 54 5 6)) + (Period.make 0 0 1 23 59 58)) + "sub 0-0-7-6-5-4 0-0-3-54-5-6"; + + test (Date.Period.ymd + (Period.to_date + (precise_sub (make 2010 10 5 0 0 0) (make 2010 6 2 0 0 0))) + = (0, 4, 3)) + "precise_sub 2010-10-5 2010-6-2"; + test (Date.Period.ymd + (Period.to_date + (precise_sub (make 2010 10 5 0 2 3) (make 2010 6 5 0 0 0))) = + (0, 4, 0)) + "precise_sub 2010-10-5 2010-6-2"; + test (Date.Period.ymd + (Period.to_date + (precise_sub (make 2010 10 5 0 32 12) (make 2010 6 6 0 31 3))) + = (0, 3, 29)) + "precise_sub 2010-10-5 2010-6-6"; + test (Date.Period.ymd + (Period.to_date + (precise_sub (make 2010 10 5 1 3 3) (make 2010 6 4 0 23 3))) = + (0, 4, 1)) + "precise_sub 2010-10-5 2010-6-4"; + test (Date.Period.ymd + (Period.to_date + (precise_sub (make 2010 1 1 0 0 0) (make 2000 1 1 0 0 0))) + = (10, 0, 0)) + "precise_sub 2010-1-1 2000-1-1"; + + test (Period.equal + (Period.opp (Period.make 0 0 2 3 0 0)) + (Period.make 0 0 (-2) (-3) 0 0)) + "period opp"; + + (* Date *) + + let d = make 2003 12 31 12 24 48 in + test (next d `Month = make 2004 1 31 12 24 48) "2003-12-31 + 1 mois"; + test (add d (Period.month 2) = make 2004 3 2 12 24 48) "2003-12-31 + 2 mois"; + let d3 = make 2011 3 24 0 0 0 in + test (prev d3 `Year = make 2010 3 24 0 0 0) "2011-3-24 - 1 year"; + let d2 = make (-3000) 1 1 6 12 24 in + test (equal (rem d (sub d d2)) d2) "rem x (sub x y) = y"; + test (is_leap_day (make 2000 2 24 0 0 0)) "2000-2-24 leap day"; + test (not (is_leap_day (make 2000 2 25 0 0 0))) "2000-2-25 not leap day"; + test (is_gregorian (make 1600 1 1 0 0 0)) "1600-1-1 gregorian"; + test (not (is_gregorian (make 1400 1 1 0 0 0))) "1400-1-1 not gregorian"; + test (is_julian (make 1582 1 1 0 0 0)) "1582-1-1 julian"; + test (not (is_julian (make 1583 1 1 0 0 0))) "1583-1-1 not julian"; + + (* Time *) + + test (let n = Unix.gmtime (Unix.time ()) in + hour (from_unixtm n) = n.Unix.tm_hour) "from_unixtm invariant UTC"; + test (let n = Unix.time () in + hour (from_unixfloat n) = (Unix.gmtime n).Unix.tm_hour) + "from_unixfloat invariant UTC"; + + Time_Zone.change (Time_Zone.UTC_Plus 10); + + test (let n = Unix.gmtime (Unix.time ()) in + hour (from_unixtm n) = n.Unix.tm_hour) "from_unixtm invariant +10"; + test (let n = Unix.time () in + hour (from_unixfloat n) = (Unix.gmtime n).Unix.tm_hour) + "from_unixfloat invariant +10"; + + test (equal (add (make 0 0 0 10 0 0) (Period.hour 30)) (make 0 0 1 16 0 0)) + "add 0-0-0-20-0-0 30h"; + test (equal (next (make 1999 12 31 23 59 59) `Second) (make 2000 1 1 0 0 0)) + "next 1999-31-12-23-59-59 `Second"; + let n = now () in + test (equal (prev (next n `Minute) `Minute) n) "prev next = id"; + test (equal + (convert + (make 0 0 0 23 0 0) + (Time_Zone.UTC_Plus 2) + (Time_Zone.UTC_Plus 4)) + (make 0 0 1 1 0 0)) "convert"; + test (hour (make 0 0 0 20 0 0) = 20) "hour"; + test (minute (make 0 0 0 20 10 0) = 10) "minute"; + test (second (make 0 0 0 20 10 5) = 5) "second"; + test (is_pm (make 0 0 0 10 0 0)) "is_pm 10-0-0"; + test (is_pm (make 0 0 0 34 0 0)) "is_pm 34-0-0"; + test (not (is_pm (make 0 0 0 (- 10) 0 0))) "not (is_pm (- 10) 0 0)"; + test (is_am (make 0 0 0 20 0 0)) "is_am 20-0-0"; + test (is_am (make 0 0 0 (- 34) 0 0)) "is_am (- 34) 0 0"; + test (not (is_am (make 0 0 0 34 0 0))) "not (is_pm 34 0 0)"; + + Time_Zone.change Time_Zone.UTC; + + test (let n = Unix.gmtime (Unix.time ()) in + hour (from_unixtm n) = n.Unix.tm_hour) "from_unixtm invariant UTC2"; + test (let n = Unix.time () in + hour (from_unixfloat n) = (Unix.gmtime n).Unix.tm_hour) + "from_unixfloat invariant UTC2"; + + test (to_unixfloat (make 1970 1 1 0 0 0) = 0.) "to_unixfloat 1 Jan 1970"; + test (from_unixfloat 0. = make 1970 1 1 0 0 0) "from_unixfloat 1 Jan 1970"; + test (Utils.Float.equal (to_unixfloat (make 2004 11 13 19 17 9)) 1100373429.) + "to_unixfloat"; + test (equal (from_unixfloat 1100373429.) (make 2004 11 13 19 17 9)) + "from_unixfloat"; + test (from_unixtm (to_unixtm (make 2003 7 16 23 22 21)) = + make 2003 7 16 23 22 21) + "from_unixtm to_unixtm = id"; + + test (Period.to_time (Period.second 30) = Time.Period.second 30) + "Period.to_time second"; + test (Period.to_time (Period.day 6) = Time.Period.second 518400) + "Period.to_time day"; + test (Period.safe_to_time (Period.second 30) = Time.Period.second 30) + "Period.safe_to_time second"; + test (Period.safe_to_time (Period.day 6) = Time.Period.second 518400) + "Period.safe_to_time day"; + Gen_test.test_exn (lazy (Period.to_time (Period.year 1))) "Period.to_time year"; + test (Period.ymds (Period.make 1 2 3 1 2 3) = (1, 2, 3, 3723)) "Period.ymds"; + test + (Period.ymds (Period.make (-1) (-2) (-3) (-1) (-2) (-3)) = (-1,-2,-4,82677)) + "Period.ymds neg"; + () + +let suite = ["test-calendar", `Quick, test] diff --git a/tests/test_date.ml b/tests/test_date.ml index 51893b5..b2ad9ef 100644 --- a/tests/test_date.ml +++ b/tests/test_date.ml @@ -20,154 +20,169 @@ (* LICENSE. *) (**************************************************************************) -Printf.printf "Tests of Date:\n";; - open CalendarLib;; open Date;; -include Gen_test;; -reset ();; -test_exn (lazy (make (-4713) 1 1)) "make (-4713) 1 1";; -test_exn (lazy (make 3268 1 23)) "make 3268 1 23";; -test_exn (lazy (make 1582 10 5)) "make 1582 10 10";; -test (compare (make 2003 2 29) (make 2003 3 1) = 0) "2003-2-29 = 2003-3-1";; -let d = make 2003 12 31;; -test (next d `Month = make 2004 1 31) "2003-12-31 + 1 mois";; -test (add d (Period.month 2) = make 2004 3 2) "2003-12-31 + 2 mois";; -test (add (make 2008 12 31) (Period.month 6) = make 2009 7 1) - "2008-12-31 + 6 mois";; -test (rem (make 2008 6 2) (Period.month 12) = make 2007 6 2) - "2008-6-2 - 12 mois";; -test (rem (make 2007 2 30) (Period.month 4) = make 2006 11 2) - "2008-2-30 - 4 mois";; -test (make 2007 (-38) 30 = make 2003 10 30) - "2007-(-38)-30 - 2003 10 30";; -test (rem (make 2007 2 30) (Period.month 40) = make 2003 11 2) - "2008-2-30 - 40 mois";; -let d2 = make (-3000) 1 1;; -test (rem d (sub d d2) = d2) "rem x (sub x y) = y";; -test (Period.ymd (precise_sub (make 2010 10 5) (make 2010 6 2)) = (0, 4, 3)) -"precise_sub 2010-10-5 2010-6-2";; -test (Period.ymd (precise_sub (make 2010 10 5) (make 2010 6 5)) = (0, 4, 0)) -"precise_sub 2010-10-5 2010-6-2";; -test (Period.ymd (precise_sub (make 2010 10 5) (make 2010 6 6)) = (0, 3, 29)) -"precise_sub 2010-10-5 2010-6-6";; -test (Period.ymd (precise_sub (make 2010 10 5) (make 2010 6 4)) = (0, 4, 1)) -"precise_sub 2010-10-5 2010-6-4";; -test (Period.ymd (precise_sub (make 2010 1 1) (make 2000 1 1)) = (10, 0, 0)) -"precise_sub 2010-1-1 2000-1-1";; -test (from_jd 0 = make (-4712) 1 1) "from_jd 0 = 4713 BC-1-1";; -test (to_jd (from_jd 12345) = 12345) "to_jd (from_jd x) = x";; -test (from_mjd 0 = make 1858 11 17) "from_mjd 0 = 1858-11-17";; -test (to_mjd (from_mjd 12345) = 12345) "to_mjd (from_mjd x) = x";; -test (is_leap_day (make 2000 2 24)) "2000-2-24 leap day";; -test (not (is_leap_day (make 2000 2 25))) "2000-2-25 not leap day";; -test (is_gregorian (make 1600 1 1)) "1600-1-1 gregorian";; -test (not (is_gregorian (make 1400 1 1))) "1400-1-1 not gregorian";; -test (is_julian (make 1582 1 1)) "1582-1-1 julian";; -test (not (is_julian (make 1583 1 1))) "1583-1-1 not julian";; -test (int_of_day Mon = 1) "Monday = 1";; -test (int_of_day Sun = 7) "Sunday = 7";; -test (day_of_int 1 = Mon) "1 = Monday";; -test (day_of_int 7 = Sun) "1 = Monday";; -test (int_of_month Jan = 1) "January = 1";; -test (month_of_int 12 = Dec) "12 = December";; -test (not (is_leap_year 1999)) "1999 not leap year";; -test (not (is_leap_year 1800)) "1800 not leap year";; -test (is_leap_year 1996) "1996 leap year";; -test (is_leap_year 1600) "1600 leap year";; -test (same_calendar 1956 1900) "same calendar 1956 1900";; -test (same_calendar 2001 2013) "same calendar 2001 2013";; -test (same_calendar 1998 2009) "same calendar 1998 2009";; -test (same_calendar 2003 2025) "same calendar 2003 2025";; -test (days_in_year 2000 = 366) "days_in_year 2000";; -test (days_in_year 1900 = 365) "days_in_year 1900";; -test (days_in_year ~month:Jan 2000 = 31) "days_in_year Jan 2000";; -test (days_in_year ~month:Feb 2000 = 60) "days_in_year Feb 2000";; -test (days_in_year ~month:Jan 2000 = 31) "days_in_year Jan 2000";; -test (days_in_year ~month:Mar 1900 = 90) "days_in_year Mar 1900";; -test (weeks_in_year 2000 = 52) "weeks_in_year 2000";; -test (weeks_in_year 2020 = 53) "weeks_in_year 2020";; -test (weeks_in_year 1991 = 52) "weeks_in_year 1991";; -test (weeks_in_year 1999 = 52) "weeks_in_year 1999";; -test (days_in_month (make 2000 2 18) = 29) "days_in_month 2000-2-18";; -test (days_in_month (make_year_month 2000 2) = 29) "days_in_month 2000-2";; -(* untypable: *) -(* test (days_in_month ((make_year 2000 :> [ `Year | `Month ] Date.date)) = 29) "days_in_month 2000-2";; *) -test (days_in_year 1900 = 365) "days_in_year 1900";; -test (century 2000 = 20) "century 2000";; -test (century 2001 = 21) "century 2001";; -test (millenium 2000 = 2) "millenium 2000";; -test (millenium 2001 = 3) "millenium 2001";; -test (year (make_year_month 2000 3) = 2000) "year 2000-3";; -test (year (make_year 2000) = 2000) "year 2000";; -test (month (make 2000 4 23) = Apr) "year 2000-4-23";; -test (month (make_year_month 2000 3) = Mar) "year 2000-3";; -(* untypable: *) -(*test (month (make_year 2000) = Mar) "year 2000";;*) -test (easter 2003 = make 2003 4 20) "Paques 2003";; -test (Period.nb_days (Period.make 0 0 6) = 6) "Period.nb_days ok";; -test (Period.safe_nb_days (Period.week 3) = 21) "Period.safe_nb_days ok";; -test_exn (lazy (Period.nb_days (Period.make 1 0 0))) "Period.nb_days ko";; -test (week_first_last 21 2004 = (make 2004 5 17, make 2004 5 23)) - "week_beggining_end";; -test (Period.ymd (Period.make 1 2 3) = (1, 2, 3)) "Period.ymd";; -test (nth_weekday_of_month 2004 Oct Thu 4 = make 2004 10 28) - "nth_weekday_of_month";; -test (nth_weekday_of_month 2006 Mar Fri 3 = make 2006 3 17) - "nth_weekday_of_month";; -test (equal (from_day_of_year 2008 39) (make 2008 2 8)) - "from_day_of_year";; -test (is_valid_date 2008 2 8) "is_valid_date";; -test (not (is_valid_date 2008 2 30)) "not is_valid_date";; +let test() = + let test x s = Alcotest.(check bool) s true x in + + Gen_test.test_exn (lazy (make (-4713) 1 1)) "make (-4713) 1 1"; + Gen_test.test_exn (lazy (make 3268 1 23)) "make 3268 1 23"; + Gen_test.test_exn (lazy (make 1582 10 5)) "make 1582 10 10"; + test (compare (make 2003 2 29) (make 2003 3 1) = 0) "2003-2-29 = 2003-3-1"; + + test ((make 2018 10 29) > (make 2018 10 28)) "2018-10-29 > 2018-10-28"; + test ((make 2018 10 29) >= (make 2018 10 28)) "2018-10-29 >= 2018-10-28"; + test ((make 2018 10 29) >= (make 2018 10 29)) "2018-10-29 >= 2018-10-29"; + test ((make 2018 10 29) < (make 2018 10 30)) "2018-10-29 < 2018-10-30"; + test ((make 2018 10 29) <= (make 2018 10 30)) "2018-10-29 <= 2018-10-30"; + test ((make 2018 10 29) <= (make 2018 10 29)) "2018-10-29 <= 2018-10-29"; + + let d = make 2003 12 31 in + test (next d `Month = make 2004 1 31) "2003-12-31 + 1 mois"; + test (add d (Period.month 2) = make 2004 3 2) "2003-12-31 + 2 mois"; + test (add (make 2008 12 31) (Period.month 6) = make 2009 7 1) + "2008-12-31 + 6 mois"; + test (rem (make 2008 6 2) (Period.month 12) = make 2007 6 2) + "2008-6-2 - 12 mois"; + test (rem (make 2007 2 30) (Period.month 4) = make 2006 11 2) + "2008-2-30 - 4 mois"; + test (make 2007 (-38) 30 = make 2003 10 30) + "2007-(-38)-30 - 2003 10 30"; + test (rem (make 2007 2 30) (Period.month 40) = make 2003 11 2) + "2008-2-30 - 40 mois"; + let d2 = make (-3000) 1 1 in + test (rem d (sub d d2) = d2) "rem x (sub x y) = y"; + test (Period.ymd (precise_sub (make 2010 10 5) (make 2010 6 2)) = (0, 4, 3)) + "precise_sub 2010-10-5 2010-6-2"; + test (Period.ymd (precise_sub (make 2010 10 5) (make 2010 6 5)) = (0, 4, 0)) + "precise_sub 2010-10-5 2010-6-2"; + test (Period.ymd (precise_sub (make 2010 10 5) (make 2010 6 6)) = (0, 3, 29)) + "precise_sub 2010-10-5 2010-6-6"; + test (Period.ymd (precise_sub (make 2010 10 5) (make 2010 6 4)) = (0, 4, 1)) + "precise_sub 2010-10-5 2010-6-4"; + test (Period.ymd (precise_sub (make 2010 1 1) (make 2000 1 1)) = (10, 0, 0)) + "precise_sub 2010-1-1 2000-1-1"; + test (from_jd 0 = make (-4712) 1 1) "from_jd 0 = 4713 BC-1-1"; + test (to_jd (from_jd 12345) = 12345) "to_jd (from_jd x) = x"; + test (from_mjd 0 = make 1858 11 17) "from_mjd 0 = 1858-11-17"; + test (to_mjd (from_mjd 12345) = 12345) "to_mjd (from_mjd x) = x"; + test (is_leap_day (make 2000 2 24)) "2000-2-24 leap day"; + test (not (is_leap_day (make 2000 2 25))) "2000-2-25 not leap day"; + test (is_gregorian (make 1600 1 1)) "1600-1-1 gregorian"; + test (not (is_gregorian (make 1400 1 1))) "1400-1-1 not gregorian"; + test (is_julian (make 1582 1 1)) "1582-1-1 julian"; + test (not (is_julian (make 1583 1 1))) "1583-1-1 not julian"; + test (int_of_day Mon = 1) "Monday = 1"; + test (int_of_day Sun = 7) "Sunday = 7"; + test (day_of_int 1 = Mon) "1 = Monday"; + test (day_of_int 7 = Sun) "1 = Monday"; + test (int_of_month Jan = 1) "January = 1"; + test (month_of_int 12 = Dec) "12 = December"; + test (not (is_leap_year 1999)) "1999 not leap year"; + test (not (is_leap_year 1800)) "1800 not leap year"; + test (is_leap_year 1996) "1996 leap year"; + test (is_leap_year 1600) "1600 leap year"; + test (same_calendar 1956 1900) "same calendar 1956 1900"; + test (same_calendar 2001 2013) "same calendar 2001 2013"; + test (same_calendar 1998 2009) "same calendar 1998 2009"; + test (same_calendar 2003 2025) "same calendar 2003 2025"; + test (days_in_year 2000 = 366) "days_in_year 2000"; + test (days_in_year 1900 = 365) "days_in_year 1900"; + test (days_in_year ~month:Jan 2000 = 31) "days_in_year Jan 2000"; + test (days_in_year ~month:Feb 2000 = 60) "days_in_year Feb 2000"; + test (days_in_year ~month:Jan 2000 = 31) "days_in_year Jan 2000"; + test (days_in_year ~month:Mar 1900 = 90) "days_in_year Mar 1900"; + test (weeks_in_year 2000 = 52) "weeks_in_year 2000"; + test (weeks_in_year 2020 = 53) "weeks_in_year 2020"; + test (weeks_in_year 1991 = 52) "weeks_in_year 1991"; + test (weeks_in_year 1999 = 52) "weeks_in_year 1999"; + test (days_in_month (make 2000 2 18) = 29) "days_in_month 2000-2-18"; + test (days_in_month (make_year_month 2000 2) = 29) "days_in_month 2000-2"; + (* untypable: *) + (* test (days_in_month ((make_year 2000 :> [ `Year | `Month ] Date.date)) = 29) "days_in_month 2000-2"; *) + test (days_in_year 1900 = 365) "days_in_year 1900"; + test (century 2000 = 20) "century 2000"; + test (century 2001 = 21) "century 2001"; + test (millenium 2000 = 2) "millenium 2000"; + test (millenium 2001 = 3) "millenium 2001"; + test (year (make_year_month 2000 3) = 2000) "year 2000-3"; + test (year (make_year 2000) = 2000) "year 2000"; + test (month (make 2000 4 23) = Apr) "year 2000-4-23"; + test (month (make_year_month 2000 3) = Mar) "year 2000-3"; + (* untypable: *) + (*test (month (make_year 2000) = Mar) "year 2000";*) + test (easter 2003 = make 2003 4 20) "Paques 2003"; + test (Period.nb_days (Period.make 0 0 6) = 6) "Period.nb_days ok"; + test (Period.safe_nb_days (Period.week 3) = 21) "Period.safe_nb_days ok"; + Gen_test.test_exn (lazy (Period.nb_days (Period.make 1 0 0))) "Period.nb_days ko"; + + test (week_first_last 21 2004 = (make 2004 5 17, make 2004 5 23)) + "week_beggining_end"; + + (* January 4th must be in the first week (ISO 8601) *) + (* 2015 is an interesting year in this regard as it tests this rule + to its extreme *) + test (week_first_last 1 2015 = (make 2014 12 29, make 2015 1 4)) + "iso_week_number_startof_2015"; + test (week_first_last 53 2015 = (make 2015 12 28, make 2016 1 3)) + "iso_week_number_endof_2015"; + + test (Period.ymd (Period.make 1 2 3) = (1, 2, 3)) "Period.ymd"; + test (nth_weekday_of_month 2004 Oct Thu 4 = make 2004 10 28) + "nth_weekday_of_month"; + test (nth_weekday_of_month 2006 Mar Fri 3 = make 2006 3 17) + "nth_weekday_of_month"; + test (equal (from_day_of_year 2008 39) (make 2008 2 8)) + "from_day_of_year"; + test (is_valid_date 2008 2 8) "is_valid_date"; + test (not (is_valid_date 2008 2 30)) "not is_valid_date"; -(* Unix *) -Time_Zone.change Time_Zone.UTC;; -test (to_unixfloat (make 1970 1 1) = 0.) "to_unixfloat 1 Jan 1970";; -test (from_unixfloat 0. = make 1970 1 1) "from_unixfloat 0.";; -test (to_unixfloat (make 2004 11 13) = 1100304000.) "to_unixfloat";; -test (from_unixfloat 1100304000. = make 2004 11 13) "from_unixfloat";; -test (from_unixtm (to_unixtm (make 2003 7 16)) = make 2003 7 16) - "from_unixtm to_unixtm = id";; -Time_Zone.change (Time_Zone.UTC_Plus (-1));; -test (from_unixfloat 0. = make 1969 12 31) "from_unixfloat 0. (dec-)";; -test (from_unixtm { Unix.tm_sec = 0; tm_min = 0; tm_hour = 0; tm_mday = 1; - tm_mon = 0; tm_year = 70; tm_wday = 4; tm_yday = 0; - tm_isdst = false } = make 1969 12 31) - "from_unixtm (dec-)";; -Time_Zone.change (Time_Zone.UTC_Plus 1);; -test (from_unixfloat 1100390390. = make 2004 11 14) "from_unixfloat (dec+)";; -test (from_unixtm { Unix.tm_sec = 0; tm_min = 0; tm_hour = 0; tm_mday = 14; - tm_mon = 10; tm_year = 104; tm_wday = 0; tm_yday = 318; - tm_isdst = false } = make 2004 11 14) - "from_unixtm (dec+)";; -test (from_unixtm (to_unixtm (make 2003 7 16)) = make 2003 7 16) - "from_unixtm to_unixtm = id";; + (* Unix *) + Time_Zone.change Time_Zone.UTC; + test (to_unixfloat (make 1970 1 1) = 0.) "to_unixfloat 1 Jan 1970"; + test (from_unixfloat 0. = make 1970 1 1) "from_unixfloat 0."; + test (to_unixfloat (make 2004 11 13) = 1100304000.) "to_unixfloat"; + test (from_unixfloat 1100304000. = make 2004 11 13) "from_unixfloat"; + test (from_unixtm (to_unixtm (make 2003 7 16)) = make 2003 7 16) + "from_unixtm to_unixtm = id"; + Time_Zone.change (Time_Zone.UTC_Plus (-1)); + test (from_unixfloat 0. = make 1969 12 31) "from_unixfloat 0. (dec-)"; + test (from_unixtm { Unix.tm_sec = 0; tm_min = 0; tm_hour = 0; tm_mday = 1; + tm_mon = 0; tm_year = 70; tm_wday = 4; tm_yday = 0; + tm_isdst = false } = make 1969 12 31) + "from_unixtm (dec-)"; + Time_Zone.change (Time_Zone.UTC_Plus 1); + test (from_unixfloat 1100390390. = make 2004 11 14) "from_unixfloat (dec+)"; + test (from_unixtm { Unix.tm_sec = 0; tm_min = 0; tm_hour = 0; tm_mday = 14; + tm_mon = 10; tm_year = 104; tm_wday = 0; tm_yday = 318; + tm_isdst = false } = make 2004 11 14) + "from_unixtm (dec+)"; + test (from_unixtm (to_unixtm (make 2003 7 16)) = make 2003 7 16) + "from_unixtm to_unixtm = id"; -(* to_business *) -test (to_business (make 2003 1 1) = (2003, 1, Wed)) "to_business 1";; -test (to_business (make 2003 12 31) = (2004, 1, Wed)) "to_business 2";; -test (to_business (make 2002 12 31) = (2003, 1, Tue)) "to_business 3";; -test (to_business (make 2005 1 1) = (2004, 53, Sat)) "to_business 4";; -test (to_business (make 2004 12 31) = (2004, 53, Fri)) "to_business 5";; -test (to_business (make 2006 1 1) = (2005, 52, Sun)) "to_business 6";; -test (to_business (make 2005 1 17) = (2005, 3, Mon)) "to_business 7";; -test (to_business (make 2006 1 31) = (2006, 5, Tue)) "to_business 8";; -test (to_business (make 2005 1 31) = (2005, 5, Mon)) "to_business 9";; -(* from_business *) -test (from_business 2003 1 Wed = make 2003 1 1) "from_business 1";; -test (from_business 2004 1 Wed = make 2003 12 31) "from_business 2";; -test (from_business 2003 1 Tue = make 2002 12 31) "from_business 3";; -test (from_business 2004 53 Sat = make 2005 1 1) "from_business 4";; -test (from_business 2004 53 Fri = make 2004 12 31) "from_business 5";; -test (from_business 2005 52 Sun = make 2006 1 1) "from_business 6";; -test (from_business 2005 3 Mon = make 2005 1 17) "from_business 7";; -test (from_business 2006 5 Tue = make 2006 1 31) "from_business 8";; -test (from_business 2005 5 Mon = make 2005 1 31) "from_business 9";; -test_exn (lazy (from_business 2005 0 Sun)) "from_business_bad 1";; -test_exn (lazy (from_business 2005 53 Sun)) "from_business_bad 2";; + (* to_business *) + test (to_business (make 2003 1 1) = (2003, 1, Wed)) "to_business 1"; + test (to_business (make 2003 12 31) = (2004, 1, Wed)) "to_business 2"; + test (to_business (make 2002 12 31) = (2003, 1, Tue)) "to_business 3"; + test (to_business (make 2005 1 1) = (2004, 53, Sat)) "to_business 4"; + test (to_business (make 2004 12 31) = (2004, 53, Fri)) "to_business 5"; + test (to_business (make 2006 1 1) = (2005, 52, Sun)) "to_business 6"; + test (to_business (make 2005 1 17) = (2005, 3, Mon)) "to_business 7"; + test (to_business (make 2006 1 31) = (2006, 5, Tue)) "to_business 8"; + test (to_business (make 2005 1 31) = (2005, 5, Mon)) "to_business 9"; + (* from_business *) + test (from_business 2003 1 Wed = make 2003 1 1) "from_business 1"; + test (from_business 2004 1 Wed = make 2003 12 31) "from_business 2"; + test (from_business 2003 1 Tue = make 2002 12 31) "from_business 3"; + test (from_business 2004 53 Sat = make 2005 1 1) "from_business 4"; + test (from_business 2004 53 Fri = make 2004 12 31) "from_business 5"; + test (from_business 2005 52 Sun = make 2006 1 1) "from_business 6"; + test (from_business 2005 3 Mon = make 2005 1 17) "from_business 7"; + test (from_business 2006 5 Tue = make 2006 1 31) "from_business 8"; + test (from_business 2005 5 Mon = make 2005 1 31) "from_business 9"; + Gen_test.test_exn (lazy (from_business 2005 0 Sun)) "from_business_bad 1"; + Gen_test.test_exn (lazy (from_business 2005 53 Sun)) "from_business_bad 2"; + () -let ok = nb_ok ();; -let bug = nb_bug ();; -Printf.printf "tests ok : %d; tests ko : %d\n" ok bug;; -flush stdout;; +let suite = ["test_date", `Quick, test] diff --git a/tests/test_fcalendar.ml b/tests/test_fcalendar.ml index b6f4afc..88e13dd 100644 --- a/tests/test_fcalendar.ml +++ b/tests/test_fcalendar.ml @@ -20,9 +20,7 @@ (* LICENSE. *) (**************************************************************************) -(*i $Id: test_fcalendar.ml 259 2014-10-29 10:00:46Z signoles $ i*) - -Printf.printf "Tests of Fcalendar:\n";; +(*i $Id$ i*) open CalendarLib;; open Fcalendar;; diff --git a/tests/test_fpcalendar.ml b/tests/test_fpcalendar.ml index e1299e1..b21e0d0 100644 --- a/tests/test_fpcalendar.ml +++ b/tests/test_fpcalendar.ml @@ -20,153 +20,151 @@ (* LICENSE. *) (**************************************************************************) -(*i $Id: test_fpcalendar.ml 259 2014-10-29 10:00:46Z signoles $ i*) - -Printf.printf "Tests of FPcalendar:\n";; +(*i $Id$ i*) open CalendarLib;; open Fcalendar.Precise;; -include Gen_test;; -reset ();; - -let eps = 0.000001;; - -Time_Zone.change Time_Zone.UTC;; - -(* Fcalendar *) - -test_exn (lazy (make (-4712) 1 1 12 0 (-1.))) "-4713-12-31-23-59-59";; -test (make (-4712) 1 1 12 0 0. = make (-4712) 1 0 36 0 0.) "calendar coercion";; -test (from_jd 0. = make (-4712) 1 1 12 0 0.) "from_jd 0 = 4713 BC-1-1";; -test (from_mjd 0. = make 1858 11 17 0 0 0.) "from_mjd 0 = 1858-11-17";; - -Time_Zone.change (Time_Zone.UTC_Plus 5);; - -test (abs_float (to_jd (from_jd 12345.6789) -. 12345.6789) < eps) - "to_jd (from_jd x) = x";; -test (abs_float (to_mjd (from_mjd 12345.6789) -. 12345.6789) < eps) - "to_mjd (from_mjd x) = x";; -test (Period.to_date (Period.hour 60) = Date.Period.day 2) - "period(60h) = period(2d)";; -test (Period.compare (Period.day 2) (Period.hour 60) < 0) "Period.compare <";; -test (Period.compare (Period.day 3) (Period.hour 60) > 0) "Period.compare >";; -test (Period.compare - (Period.add (Period.day 2) (Period.hour 12)) - (Period.hour 60) = 0) "Period.compare =";; -test - (add (make 1 2 3 4 5 6.) (Period.make 9 8 7 6 5 4.5) = - make 10 10 10 10 10 10.5) - "add 1-2-3-4-5-6 9-8-7-6-5-4.5";; -test - (add (make 3 1 1 0 0 0.7) (Period.make 0 0 0 (-25) 0 (-1.3)) = - make 2 12 30 22 59 59.4) - "add 3-1-1-0-0-0.7 0-0-0-(-25)-0-(-1.3)";; - -test - (equal (rem (make 9 8 7 6 5 4.9) (Period.make 1 2 3 4 5 6.4)) - (make 8 6 4 1 59 58.5)) - "rem 9-8-7-6-5-4 1-2-3-4-5-6";; - -test (Period.equal - (sub (make 0 0 7 6 5 4.) (make 0 0 3 54 5 6.)) - (Period.make 0 0 1 23 59 58.)) - "sub 0-0-7-6-5-4 0-0-3-54-5-6";; - -test (Period.equal - (Period.opp (Period.make 0 0 2 3 0 0.)) - (Period.make 0 0 (-2) (-3) 0 0.)) - "period opp";; - -(* Date *) - -let d = make 2003 12 31 12 24 48.;; -test (next d `Month = make 2004 1 31 12 24 48.) "2003-12-31 + 1 mois";; -test (add d (Period.month 2) = make 2004 3 2 12 24 48.) "2003-12-31 + 2 mois";; -let d3 = make 2011 3 24 0 0 0.;; -test (prev d3 `Year = make 2010 3 24 0 0 0.) "2011-3-24 - 1 year";; -let d2 = make (-3000) 1 1 6 12 24.5;; -test (equal (rem d (sub d d2)) d2) "rem x (sub x y) = y";; -test (is_leap_day (make 2000 2 24 0 0 0.)) "2000-2-24 leap day";; -test (not (is_leap_day (make 2000 2 25 0 0 0.))) "2000-2-25 not leap day";; -test (is_gregorian (make 1600 1 1 0 0 0.4)) "1600-1-1 gregorian";; -test (not (is_gregorian (make 1400 1 1 0 0 0.1))) "1400-1-1 not gregorian";; -test (is_julian (make 1582 1 1 0 0 0.1)) "1582-1-1 julian";; -test (not (is_julian (make 1583 1 1 0 0 0.9832))) "1583-1-1 not julian";; - -(* Time *) - -test (let n = Unix.gmtime (Unix.time ()) in - hour (from_unixtm n) = n.Unix.tm_hour) "from_unixtm invariant UTC";; -test (let n = Unix.time () in - hour (from_unixfloat n) = (Unix.gmtime n).Unix.tm_hour) - "from_unixfloat invariant UTC";; - -Time_Zone.change (Time_Zone.UTC_Plus 10);; - -test (let n = Unix.gmtime (Unix.time ()) in - hour (from_unixtm n) = n.Unix.tm_hour) "from_unixtm invariant +10";; -test (let n = Unix.time () in - hour (from_unixfloat n) = (Unix.gmtime n).Unix.tm_hour) - "from_unixfloat invariant +10";; - -test (equal (add (make 0 0 0 10 0 0.1) (Period.hour 30)) (make 0 0 1 16 0 0.1)) - "add 0-0-0-20-0-0 30h";; -test (equal - (next (make 1999 12 31 23 59 59.43) `Second) - (make 2000 1 1 0 0 0.43)) - "next 1999-31-12-23-59-59 `Second";; -let n = now ();; -test (equal (prev (next n `Minute) `Minute) n) "prev next = id";; -test (equal - (convert - (make 0 0 0 23 0 0.1234) - (Time_Zone.UTC_Plus 2) - (Time_Zone.UTC_Plus 4)) - (make 0 0 1 1 0 0.1234)) "convert";; - -test (hour (make 0 0 0 20 0 0.) = 20) "hour";; -test (minute (make 0 0 0 20 10 0.2) = 10) "minute";; -test (Utils.Float.equal (second (make 0 0 0 20 10 5.123)) 5.123) "second";; - -test (is_pm (make 0 0 0 10 0 0.1)) "is_pm 10-0-0";; -test (is_pm (make 0 0 0 34 0 0.)) "is_pm 34-0-0";; -test (not (is_pm (make 0 0 0 (- 10) 0 0.))) "not (is_pm (- 10) 0 0)";; -test (is_am (make 0 0 0 20 0 0.)) "is_am 20-0-0";; -test (is_am (make 0 0 0 (- 34) 0 0.)) "is_am (- 34) 0 0";; -test (not (is_am (make 0 0 0 34 0 0.))) "not (is_pm 34 0 0)";; - -Time_Zone.change Time_Zone.UTC;; - -test (let n = Unix.gmtime (Unix.time ()) in - hour (from_unixtm n) = n.Unix.tm_hour) "from_unixtm invariant UTC2";; -test (let n = Unix.time () in - hour (from_unixfloat n) = (Unix.gmtime n).Unix.tm_hour) - "from_unixfloat invariant UTC2";; - -test (to_unixfloat (make 1970 1 1 0 0 0.) = 0.) "to_unixfloat 1 Jan 1970";; -test (from_unixfloat 0. = make 1970 1 1 0 0 0.) "from_unixfloat 1 Jan 1970";; -test (floor (to_unixfloat (make 2004 11 13 19 17 10.)) = 1100373429.) - "to_unixfloat";; -test (equal (from_unixfloat 1100373429.) (make 2004 11 13 19 17 09.)) - "from_unixfloat";; - -test (equal - (from_unixtm (to_unixtm (make 2003 7 16 23 22 21.))) - (make 2003 7 16 23 22 21.)) - "from_unixtm to_unixtm = id";; - -test (Period.safe_to_time (Period.second 30.12) = Time.Period.second 30.12) - "Period.safe_to_time second";; -test (Period.safe_to_time (Period.day 6) = Time.Period.second 518400.) - "Period.safe_to_time day";; -test_exn (lazy (Period.to_time (Period.year 1))) "Period.to_time year";; -test (Period.ymds (Period.make 1 2 3 1 2 3.1) = (1, 2, 3, 3723.1)) - "Period.ymds";; -test - (Period.ymds (Period.make (-1) (-2) (-3) (-1) (-2) (-3.)) = (-1,-2,-4,82677.)) - "Period.ymds neg";; - -let ok = nb_ok ();; -let bug = nb_bug ();; -Printf.printf "tests ok : %d; tests ko : %d\n" ok bug;; -flush stdout;; + + +let test () = + let test x s = Alcotest.(check bool) s true x in + + let eps = 0.000001 in + + Time_Zone.change Time_Zone.UTC; + + (* Fcalendar *) + + Gen_test.test_exn (lazy (make (-4712) 1 1 12 0 (-1.))) "-4713-12-31-23-59-59"; + test (make (-4712) 1 1 12 0 0. = make (-4712) 1 0 36 0 0.) "calendar coercion"; + test (from_jd 0. = make (-4712) 1 1 12 0 0.) "from_jd 0 = 4713 BC-1-1"; + test (from_mjd 0. = make 1858 11 17 0 0 0.) "from_mjd 0 = 1858-11-17"; + + Time_Zone.change (Time_Zone.UTC_Plus 5); + + test (abs_float (to_jd (from_jd 12345.6789) -. 12345.6789) < eps) + "to_jd (from_jd x) = x"; + test (abs_float (to_mjd (from_mjd 12345.6789) -. 12345.6789) < eps) + "to_mjd (from_mjd x) = x"; + test (Period.to_date (Period.hour 60) = Date.Period.day 2) + "period(60h) = period(2d)"; + test (Period.compare (Period.day 2) (Period.hour 60) < 0) "Period.compare <"; + test (Period.compare (Period.day 3) (Period.hour 60) > 0) "Period.compare >"; + test (Period.compare + (Period.add (Period.day 2) (Period.hour 12)) + (Period.hour 60) = 0) "Period.compare ="; + test + (add (make 1 2 3 4 5 6.) (Period.make 9 8 7 6 5 4.5) = + make 10 10 10 10 10 10.5) + "add 1-2-3-4-5-6 9-8-7-6-5-4.5"; + test + (add (make 3 1 1 0 0 0.7) (Period.make 0 0 0 (-25) 0 (-1.3)) = + make 2 12 30 22 59 59.4) + "add 3-1-1-0-0-0.7 0-0-0-(-25)-0-(-1.3)"; + + test + (equal (rem (make 9 8 7 6 5 4.9) (Period.make 1 2 3 4 5 6.4)) + (make 8 6 4 1 59 58.5)) + "rem 9-8-7-6-5-4 1-2-3-4-5-6"; + + test (Period.equal + (sub (make 0 0 7 6 5 4.) (make 0 0 3 54 5 6.)) + (Period.make 0 0 1 23 59 58.)) + "sub 0-0-7-6-5-4 0-0-3-54-5-6"; + + test (Period.equal + (Period.opp (Period.make 0 0 2 3 0 0.)) + (Period.make 0 0 (-2) (-3) 0 0.)) + "period opp"; + + (* Date *) + + let d = make 2003 12 31 12 24 48. in + test (next d `Month = make 2004 1 31 12 24 48.) "2003-12-31 + 1 mois"; + test (add d (Period.month 2) = make 2004 3 2 12 24 48.) "2003-12-31 + 2 mois"; + let d3 = make 2011 3 24 0 0 0. in + test (prev d3 `Year = make 2010 3 24 0 0 0.) "2011-3-24 - 1 year"; + let d2 = make (-3000) 1 1 6 12 24.5 in + test (equal (rem d (sub d d2)) d2) "rem x (sub x y) = y"; + test (is_leap_day (make 2000 2 24 0 0 0.)) "2000-2-24 leap day"; + test (not (is_leap_day (make 2000 2 25 0 0 0.))) "2000-2-25 not leap day"; + test (is_gregorian (make 1600 1 1 0 0 0.4)) "1600-1-1 gregorian"; + test (not (is_gregorian (make 1400 1 1 0 0 0.1))) "1400-1-1 not gregorian"; + test (is_julian (make 1582 1 1 0 0 0.1)) "1582-1-1 julian"; + test (not (is_julian (make 1583 1 1 0 0 0.9832))) "1583-1-1 not julian"; + + (* Time *) + + test (let n = Unix.gmtime (Unix.time ()) in + hour (from_unixtm n) = n.Unix.tm_hour) "from_unixtm invariant UTC"; + test (let n = Unix.time () in + hour (from_unixfloat n) = (Unix.gmtime n).Unix.tm_hour) + "from_unixfloat invariant UTC"; + + Time_Zone.change (Time_Zone.UTC_Plus 10); + + test (let n = Unix.gmtime (Unix.time ()) in + hour (from_unixtm n) = n.Unix.tm_hour) "from_unixtm invariant +10"; + test (let n = Unix.time () in + hour (from_unixfloat n) = (Unix.gmtime n).Unix.tm_hour) + "from_unixfloat invariant +10"; + + test (equal (add (make 0 0 0 10 0 0.1) (Period.hour 30)) (make 0 0 1 16 0 0.1)) + "add 0-0-0-20-0-0 30h"; + test (equal + (next (make 1999 12 31 23 59 59.43) `Second) + (make 2000 1 1 0 0 0.43)) + "next 1999-31-12-23-59-59 `Second"; + let n = now () in + test (equal (prev (next n `Minute) `Minute) n) "prev next = id"; + test (equal + (convert + (make 0 0 0 23 0 0.1234) + (Time_Zone.UTC_Plus 2) + (Time_Zone.UTC_Plus 4)) + (make 0 0 1 1 0 0.1234)) "convert"; + + test (hour (make 0 0 0 20 0 0.) = 20) "hour"; + test (minute (make 0 0 0 20 10 0.2) = 10) "minute"; + test (Utils.Float.equal (second (make 0 0 0 20 10 5.123)) 5.123) "second"; + + test (is_pm (make 0 0 0 10 0 0.1)) "is_pm 10-0-0"; + test (is_pm (make 0 0 0 34 0 0.)) "is_pm 34-0-0"; + test (not (is_pm (make 0 0 0 (- 10) 0 0.))) "not (is_pm (- 10) 0 0)"; + test (is_am (make 0 0 0 20 0 0.)) "is_am 20-0-0"; + test (is_am (make 0 0 0 (- 34) 0 0.)) "is_am (- 34) 0 0"; + test (not (is_am (make 0 0 0 34 0 0.))) "not (is_pm 34 0 0)"; + + Time_Zone.change Time_Zone.UTC; + + test (let n = Unix.gmtime (Unix.time ()) in + hour (from_unixtm n) = n.Unix.tm_hour) "from_unixtm invariant UTC2"; + test (let n = Unix.time () in + hour (from_unixfloat n) = (Unix.gmtime n).Unix.tm_hour) + "from_unixfloat invariant UTC2"; + + test (to_unixfloat (make 1970 1 1 0 0 0.) = 0.) "to_unixfloat 1 Jan 1970"; + test (from_unixfloat 0. = make 1970 1 1 0 0 0.) "from_unixfloat 1 Jan 1970"; + test (floor (to_unixfloat (make 2004 11 13 19 17 10.)) = 1100373429.) + "to_unixfloat"; + test (equal (from_unixfloat 1100373429.) (make 2004 11 13 19 17 09.)) + "from_unixfloat"; + + test (equal + (from_unixtm (to_unixtm (make 2003 7 16 23 22 21.))) + (make 2003 7 16 23 22 21.)) + "from_unixtm to_unixtm = id"; + + test (Period.safe_to_time (Period.second 30.12) = Time.Period.second 30.12) + "Period.safe_to_time second"; + test (Period.safe_to_time (Period.day 6) = Time.Period.second 518400.) + "Period.safe_to_time day"; + Gen_test.test_exn (lazy (Period.to_time (Period.year 1))) "Period.to_time year"; + test (Period.ymds (Period.make 1 2 3 1 2 3.1) = (1, 2, 3, 3723.1)) + "Period.ymds"; + test + (Period.ymds (Period.make (-1) (-2) (-3) (-1) (-2) (-3.)) = (-1,-2,-4,82677.)) + "Period.ymds neg"; + () + +let suite = ["fpcalendar", `Quick, test] diff --git a/tests/test_ftime.ml b/tests/test_ftime.ml index 9e6d4ae..5d68c76 100644 --- a/tests/test_ftime.ml +++ b/tests/test_ftime.ml @@ -20,65 +20,75 @@ (* LICENSE. *) (**************************************************************************) -(*i $Id: test_ftime.ml 259 2014-10-29 10:00:46Z signoles $ i*) - -Printf.printf "Tests of Ftime:\n";; +(*i $Id$ i*) open CalendarLib open Ftime;; -include Gen_test;; -reset ();; -Time_Zone.change (Time_Zone.UTC_Plus 10);; +let test x s = Alcotest.(check bool) s true x +let test_f x y s = Alcotest.(check @@ testable Fmt.float Utils.Float.equal) s x y + +let test1 () = + Time_Zone.change (Time_Zone.UTC_Plus 10); -(* Some [=] are used which should be replaced by [equal]. *) + (* Some [=] are used which should be replaced by [equal]. *) -test (make 30 60 80.5 = make 31 1 20.5) "30-60-80.5 = 31-1-20.5";; -test (normalize (make 22 0 0.1) = (make 22 0 0.1, 0)) "normalize 22-0-0.1";; -test (normalize (make 73 0 0.) = (make 1 0 0., 3)) "normalize 73-0-0";; -test (normalize (make (-73) 0 0.) = (make 23 0 0., -4)) "normalize (-73)-0-0";; -test (add (make 20 0 0.2) (Period.minute 70) = make 21 10 0.2) - "add 20-0-0.2 70mn";; -test (next (make 20 3 31.) `Minute = make 20 4 31.) "next 20-3-31 `Minute"; -test (prev (make 20 3 31.34) `Second = make 20 3 30.34) - "prev 20-3-31.34 `Second";; -test (Period.equal (sub (make 6 5 4.) (make 4 5 6.1)) (Period.make 1 59 57.9)) - "sub 6-5-4. 4-5-6.1";; -test (convert (make 20 0 0.123) (Time_Zone.UTC_Plus 2) (Time_Zone.UTC_Plus 4) = - make 22 0 0.123) "convert";; -test (to_gmt (make 20 0 0.) = make 10 0 0.) "to_gmt";; -test (from_gmt (make 20 0 0.) = make 30 0 0.) "from_gmt";; -test (midnight () = make 0 0 0.) "midnight";; -test (midday () = make 12 0 0.) "midday";; -test (hour (make 20 0 59.99) = 20) "hour";; -test (minute (make 20 10 0.) = 10) "minute";; -test (second (make 20 10 5.) = 5.) "second";; + test (make 30 60 80.5 = make 31 1 20.5) "30-60-80.5 = 31-1-20.5"; + test (normalize (make 22 0 0.1) = (make 22 0 0.1, 0)) "normalize 22-0-0.1"; + test (normalize (make 73 0 0.) = (make 1 0 0., 3)) "normalize 73-0-0"; + test (normalize (make (-73) 0 0.) = (make 23 0 0., -4)) "normalize (-73)-0-0"; + test (add (make 20 0 0.2) (Period.minute 70) = make 21 10 0.2) + "add 20-0-0.2 70mn"; + test (next (make 20 3 31.) `Minute = make 20 4 31.) "next 20-3-31 `Minute"; + test (prev (make 20 3 31.34) `Second = make 20 3 30.34) + "prev 20-3-31.34 `Second"; + test (Period.equal (sub (make 6 5 4.) (make 4 5 6.1)) (Period.make 1 59 57.9)) + "sub 6-5-4. 4-5-6.1"; + test (convert (make 20 0 0.123) (Time_Zone.UTC_Plus 2) (Time_Zone.UTC_Plus 4) = + make 22 0 0.123) "convert"; + test (to_gmt (make 20 0 0.) = make 10 0 0.) "to_gmt"; + test (from_gmt (make 20 0 0.) = make 30 0 0.) "from_gmt"; + test (midnight () = make 0 0 0.) "midnight"; + test (midday () = make 12 0 0.) "midday"; + test (hour (make 20 0 59.99) = 20) "hour"; + test (minute (make 20 10 0.) = 10) "minute"; + test (second (make 20 10 5.) = 5.) "second"; + () -let one_two_three = make 1 2 3.;; -test (to_seconds one_two_three = 3723.) "to_seconds";; -test (to_minutes one_two_three = 62.05) "to_minutes";; -test (Utils.Float.equal (to_hours (make 1 3 0.4)) 1.050111) "to_hours";; -test (equal (from_seconds 3723.2) (from_minutes 62.053333333)) - "from_seconds; from_minutes";; -test (from_hours 1.05 = make 1 3 0.) "from_hours";; -test (is_pm (midnight ())) "is_pm midnight";; -test (is_pm (make 10 0 0.)) "is_pm 10-0-0";; -test (is_pm (make 34 0 0.)) "is_pm 34-0-0";; -test (not (is_pm (make (- 10) 0 0.))) "not (is_pm (- 10) 0 0)";; -test (is_am (midday ())) "is_am midday";; -test (is_am (make 20 0 0.)) "is_am 20-0-0";; -test (is_am (make (- 34) 0 0.)) "is_am (- 34) 0 0";; -test (not (is_am (make 34 0 0.))) "not (is_pm 34 0 0)";; +let test2() = + Time_Zone.change (Time_Zone.UTC_Plus 10); + Utils.Float.set_precision 1e-6; + let one_two_three = make 1 2 3. in + test (to_seconds one_two_three = 3723.) "to_seconds"; + test (to_minutes one_two_three = 62.05) "to_minutes"; + test_f (to_hours (make 1 3 0.4)) 1.050111 "to_hours"; + test (equal (from_seconds 3723.2) (from_minutes 62.053333333)) + "from_seconds; from_minutes"; + test (from_hours 1.05 = make 1 3 0.) "from_hours"; + test (is_pm (midnight ())) "is_pm midnight"; + test (is_pm (make 10 0 0.)) "is_pm 10-0-0"; + test (is_pm (make 34 0 0.)) "is_pm 34-0-0"; + test (not (is_pm (make (- 10) 0 0.))) "not (is_pm (- 10) 0 0)"; + test (is_am (midday ())) "is_am midday"; + test (is_am (make 20 0 0.)) "is_am 20-0-0"; + test (is_am (make (- 34) 0 0.)) "is_am (- 34) 0 0"; + test (not (is_am (make 34 0 0.))) "not (is_pm 34 0 0)"; + () -let one_two_three = Period.make 1 2 3.;; -test (Utils.Float.equal (Period.to_seconds one_two_three) 3723.) - "Period.to_seconds";; -test (Utils.Float.equal (Period.to_minutes one_two_three) 62.05) - "Period.to_minutes";; -test (Utils.Float.equal (Period.to_hours (Period.make 1 3 0.1)) 1.050028) - "Period.to_hours";; +let test3() = + Time_Zone.change (Time_Zone.UTC_Plus 10); + Utils.Float.set_precision 1e-6; + let one_two_three = Period.make 1 2 3. in + test_f (Period.to_seconds one_two_three) 3723. + "Period.to_seconds"; + test_f (Period.to_minutes one_two_three) 62.05 + "Period.to_minutes"; + test_f (Period.to_hours (Period.make 1 3 0.1)) 1.050028 + "Period.to_hours"; + () -let ok = nb_ok ();; -let bug = nb_bug ();; -Printf.printf "tests ok : %d; tests ko : %d\n" ok bug;; -flush stdout;; +let suite = [ + "ftime1", `Quick, test1; + "ftime2", `Quick, test2; + "ftime3", `Quick, test3; +] diff --git a/tests/test_pcalendar.ml b/tests/test_pcalendar.ml index 304bf92..e5c8224 100644 --- a/tests/test_pcalendar.ml +++ b/tests/test_pcalendar.ml @@ -20,148 +20,145 @@ (* LICENSE. *) (**************************************************************************) -(*i $Id: test_pcalendar.ml 259 2014-10-29 10:00:46Z signoles $ i*) - -Printf.printf "Tests of Precise Calendar:\n";; +(*i $Id$ i*) open CalendarLib;; open Calendar.Precise;; -include Gen_test;; -reset ();; - -let eps = 0.000001;; - -Time_Zone.change Time_Zone.UTC;; - -(* Calendar *) - -test_exn (lazy (make (-4712) 1 1 12 0 (-1))) "-4713-12-31-23-59-59";; -test (make (-4712) 1 1 12 0 0 = make (-4712) 1 0 36 0 0) "calendar coercion";; -test (from_jd 0. = make (-4712) 1 1 12 0 0) "from_jd 0 = 4713 BC-1-1";; -test (from_mjd 0. = make 1858 11 17 0 0 0) "from_mjd 0 = 1858-11-17";; - -Time_Zone.change (Time_Zone.UTC_Plus 5);; - -test (abs_float (to_jd (from_jd 12345.6789) -. 12345.6789) < eps) - "to_jd (from_jd x) = x";; -test (abs_float (to_mjd (from_mjd 12345.6789) -. 12345.6789) < eps) - "to_mjd (from_mjd x) = x";; -test (Period.to_date (Period.hour 60) = Date.Period.day 2) - "period(60h) = period(2d)";; -test (Period.compare (Period.day 2) (Period.hour 60) < 0) "Period.compare <";; -test (Period.compare (Period.day 3) (Period.hour 60) > 0) "Period.compare >";; -test (Period.compare - (Period.add (Period.day 2) (Period.hour 12)) - (Period.hour 60) = 0) "Period.compare =";; - -test - (add (make 1 2 3 4 5 6) (Period.make 9 8 7 6 5 4) = make 10 10 10 10 10 10) - "add 1-2-3-4-5-6 9-8-7-6-5-4";; -test - (add (make 3 1 1 0 0 0) (Period.make 0 0 0 (-25) 0 (-1)) = - make 2 12 30 22 59 59) - "add 3-1-1-0-0-0 0-0-0-(-25)-0-(-1)";; - -test - (equal (rem (make 9 8 7 6 5 4) (Period.make 1 2 3 4 5 6)) - (make 8 6 4 1 59 58)) - "rem 9-8-7-6-5-4 1-2-3-4-5-6";; -test (sub (make 0 0 7 6 5 4) (make 0 0 3 54 5 6) = Period.make 0 0 1 23 59 58) - "sub 0-0-7-6-5-4 0-0-3-54-5-6";; - -test (Period.equal - (Period.opp (Period.make 0 0 2 3 0 0)) - (Period.make 0 0 (-2) (-3) 0 0)) - "period opp";; - -(* Date *) - -let d = make 2003 12 31 12 24 48;; -test (next d `Month = make 2004 1 31 12 24 48) "2003-12-31 + 1 mois";; -test (add d (Period.month 2) = make 2004 3 2 12 24 48) "2003-12-31 + 2 mois";; -let d3 = make 2011 3 24 0 0 0;; -test (prev d3 `Year = make 2010 3 24 0 0 0) "2011-3-24 - 1 year";; -let d2 = make (-3000) 1 1 6 12 24;; -test (equal (rem d (sub d d2)) d2) "rem x (sub x y) = y";; -test (is_leap_day (make 2000 2 24 0 0 0)) "2000-2-24 leap day";; -test (not (is_leap_day (make 2000 2 25 0 0 0))) "2000-2-25 not leap day";; -test (is_gregorian (make 1600 1 1 0 0 0)) "1600-1-1 gregorian";; -test (not (is_gregorian (make 1400 1 1 0 0 0))) "1400-1-1 not gregorian";; -test (is_julian (make 1582 1 1 0 0 0)) "1582-1-1 julian";; -test (not (is_julian (make 1583 1 1 0 0 0))) "1583-1-1 not julian";; - -(* Time *) - -test (let n = Unix.gmtime (Unix.time ()) in - hour (from_unixtm n) = n.Unix.tm_hour) "from_unixtm invariant UTC";; -test (let n = Unix.time () in - hour (from_unixfloat n) = (Unix.gmtime n).Unix.tm_hour) - "from_unixfloat invariant UTC";; - -Time_Zone.change (Time_Zone.UTC_Plus 10);; - -test (let n = Unix.gmtime (Unix.time ()) in - hour (from_unixtm n) = n.Unix.tm_hour) "from_unixtm invariant +10";; -test (let n = Unix.time () in - hour (from_unixfloat n) = (Unix.gmtime n).Unix.tm_hour) - "from_unixfloat invariant +10";; - -test (equal (add (make 0 0 0 10 0 0) (Period.hour 30)) (make 0 0 1 16 0 0)) - "add 0-0-0-20-0-0 30h";; -test (equal (next (make 1999 12 31 23 59 59) `Second) (make 2000 1 1 0 0 0)) - "next 1999-31-12-23-59-59 `Second";; -let n = now ();; -test (equal (prev (next n `Minute) `Minute) n) "prev next = id";; - -test (equal - (convert - (make 0 0 0 23 0 0) - (Time_Zone.UTC_Plus 2) - (Time_Zone.UTC_Plus 4)) - (make 0 0 1 1 0 0)) "convert";; -test (hour (make 0 0 0 20 0 0) = 20) "hour";; -test (minute (make 0 0 0 20 10 0) = 10) "minute";; -test (second (make 0 0 0 20 10 5) = 5) "second";; -test (is_pm (make 0 0 0 10 0 0)) "is_pm 10-0-0";; -test (is_pm (make 0 0 0 34 0 0)) "is_pm 34-0-0";; -test (not (is_pm (make 0 0 0 (- 10) 0 0))) "not (is_pm (- 10) 0 0)";; -test (is_am (make 0 0 0 20 0 0)) "is_am 20-0-0";; -test (is_am (make 0 0 0 (- 34) 0 0)) "is_am (- 34) 0 0";; -test (not (is_am (make 0 0 0 34 0 0))) "not (is_pm 34 0 0)";; - -Time_Zone.change Time_Zone.UTC;; - -test (let n = Unix.gmtime (Unix.time ()) in - hour (from_unixtm n) = n.Unix.tm_hour) "from_unixtm invariant UTC2";; -test (let n = Unix.time () in - hour (from_unixfloat n) = (Unix.gmtime n).Unix.tm_hour) - "from_unixfloat invariant UTC2";; - -test (to_unixfloat (make 1970 1 1 0 0 0) = 0.) "to_unixfloat 1 Jan 1970";; -test (from_unixfloat 0. = make 1970 1 1 0 0 0) "from_unixfloat 1 Jan 1970";; -test (Utils.Float.equal (to_unixfloat (make 2004 11 13 19 17 9)) 1100373429.) - "to_unixfloat";; -test (equal (from_unixfloat 1100373429.) (make 2004 11 13 19 17 9)) - "from_unixfloat";; -test (from_unixtm (to_unixtm (make 2003 7 16 23 22 21)) = - make 2003 7 16 23 22 21) - "from_unixtm to_unixtm = id";; - -test (Period.to_time (Period.second 30) = Time.Period.second 30) - "Period.to_time second";; -test (Period.safe_to_time (Period.second 30) = Time.Period.second 30) - "Period.safe_to_time second";; -test (Period.to_time (Period.day 6) = Time.Period.second 518400) - "Period.to_time day";; -test (Period.safe_to_time (Period.day 6) = Time.Period.second 518400) - "Period.safe_to_time day";; -test_exn (lazy (Period.to_time (Period.year 1))) "Period.to_time year";; -test (Period.ymds (Period.make 1 2 3 1 2 3) = (1, 2, 3, 3723)) "Period.ymds";; -test - (Period.ymds (Period.make (-1) (-2) (-3) (-1) (-2) (-3)) = (-1,-2,-4,82677)) - "Period.ymds neg";; - -let ok = nb_ok ();; -let bug = nb_bug ();; -Printf.printf "tests ok : %d; tests ko : %d\n" ok bug;; -flush stdout;; + +let test() = + let test x s = Alcotest.(check bool) s true x in + + let eps = 0.000001 in + + Time_Zone.change Time_Zone.UTC; + + (* Calendar *) + + Gen_test.test_exn (lazy (make (-4712) 1 1 12 0 (-1))) "-4713-12-31-23-59-59"; + test (make (-4712) 1 1 12 0 0 = make (-4712) 1 0 36 0 0) "calendar coercion"; + test (from_jd 0. = make (-4712) 1 1 12 0 0) "from_jd 0 = 4713 BC-1-1"; + test (from_mjd 0. = make 1858 11 17 0 0 0) "from_mjd 0 = 1858-11-17"; + + Time_Zone.change (Time_Zone.UTC_Plus 5); + + test (abs_float (to_jd (from_jd 12345.6789) -. 12345.6789) < eps) + "to_jd (from_jd x) = x"; + test (abs_float (to_mjd (from_mjd 12345.6789) -. 12345.6789) < eps) + "to_mjd (from_mjd x) = x"; + test (Period.to_date (Period.hour 60) = Date.Period.day 2) + "period(60h) = period(2d)"; + test (Period.compare (Period.day 2) (Period.hour 60) < 0) "Period.compare <"; + test (Period.compare (Period.day 3) (Period.hour 60) > 0) "Period.compare >"; + test (Period.compare + (Period.add (Period.day 2) (Period.hour 12)) + (Period.hour 60) = 0) "Period.compare ="; + + test + (add (make 1 2 3 4 5 6) (Period.make 9 8 7 6 5 4) = make 10 10 10 10 10 10) + "add 1-2-3-4-5-6 9-8-7-6-5-4"; + test + (add (make 3 1 1 0 0 0) (Period.make 0 0 0 (-25) 0 (-1)) = + make 2 12 30 22 59 59) + "add 3-1-1-0-0-0 0-0-0-(-25)-0-(-1)"; + + test + (equal (rem (make 9 8 7 6 5 4) (Period.make 1 2 3 4 5 6)) + (make 8 6 4 1 59 58)) + "rem 9-8-7-6-5-4 1-2-3-4-5-6"; + test (sub (make 0 0 7 6 5 4) (make 0 0 3 54 5 6) = Period.make 0 0 1 23 59 58) + "sub 0-0-7-6-5-4 0-0-3-54-5-6"; + + test (Period.equal + (Period.opp (Period.make 0 0 2 3 0 0)) + (Period.make 0 0 (-2) (-3) 0 0)) + "period opp"; + + (* Date *) + + let d = make 2003 12 31 12 24 48 in + test (next d `Month = make 2004 1 31 12 24 48) "2003-12-31 + 1 mois"; + test (add d (Period.month 2) = make 2004 3 2 12 24 48) "2003-12-31 + 2 mois"; + let d3 = make 2011 3 24 0 0 0 in + test (prev d3 `Year = make 2010 3 24 0 0 0) "2011-3-24 - 1 year"; + let d2 = make (-3000) 1 1 6 12 24 in + test (equal (rem d (sub d d2)) d2) "rem x (sub x y) = y"; + test (is_leap_day (make 2000 2 24 0 0 0)) "2000-2-24 leap day"; + test (not (is_leap_day (make 2000 2 25 0 0 0))) "2000-2-25 not leap day"; + test (is_gregorian (make 1600 1 1 0 0 0)) "1600-1-1 gregorian"; + test (not (is_gregorian (make 1400 1 1 0 0 0))) "1400-1-1 not gregorian"; + test (is_julian (make 1582 1 1 0 0 0)) "1582-1-1 julian"; + test (not (is_julian (make 1583 1 1 0 0 0))) "1583-1-1 not julian"; + + (* Time *) + + test (let n = Unix.gmtime (Unix.time ()) in + hour (from_unixtm n) = n.Unix.tm_hour) "from_unixtm invariant UTC"; + test (let n = Unix.time () in + hour (from_unixfloat n) = (Unix.gmtime n).Unix.tm_hour) + "from_unixfloat invariant UTC"; + + Time_Zone.change (Time_Zone.UTC_Plus 10); + + test (let n = Unix.gmtime (Unix.time ()) in + hour (from_unixtm n) = n.Unix.tm_hour) "from_unixtm invariant +10"; + test (let n = Unix.time () in + hour (from_unixfloat n) = (Unix.gmtime n).Unix.tm_hour) + "from_unixfloat invariant +10"; + + test (equal (add (make 0 0 0 10 0 0) (Period.hour 30)) (make 0 0 1 16 0 0)) + "add 0-0-0-20-0-0 30h"; + test (equal (next (make 1999 12 31 23 59 59) `Second) (make 2000 1 1 0 0 0)) + "next 1999-31-12-23-59-59 `Second"; + let n = now () in + test (equal (prev (next n `Minute) `Minute) n) "prev next = id"; + + test (equal + (convert + (make 0 0 0 23 0 0) + (Time_Zone.UTC_Plus 2) + (Time_Zone.UTC_Plus 4)) + (make 0 0 1 1 0 0)) "convert"; + test (hour (make 0 0 0 20 0 0) = 20) "hour"; + test (minute (make 0 0 0 20 10 0) = 10) "minute"; + test (second (make 0 0 0 20 10 5) = 5) "second"; + test (is_pm (make 0 0 0 10 0 0)) "is_pm 10-0-0"; + test (is_pm (make 0 0 0 34 0 0)) "is_pm 34-0-0"; + test (not (is_pm (make 0 0 0 (- 10) 0 0))) "not (is_pm (- 10) 0 0)"; + test (is_am (make 0 0 0 20 0 0)) "is_am 20-0-0"; + test (is_am (make 0 0 0 (- 34) 0 0)) "is_am (- 34) 0 0"; + test (not (is_am (make 0 0 0 34 0 0))) "not (is_pm 34 0 0)"; + + Time_Zone.change Time_Zone.UTC; + + test (let n = Unix.gmtime (Unix.time ()) in + hour (from_unixtm n) = n.Unix.tm_hour) "from_unixtm invariant UTC2"; + test (let n = Unix.time () in + hour (from_unixfloat n) = (Unix.gmtime n).Unix.tm_hour) + "from_unixfloat invariant UTC2"; + + test (to_unixfloat (make 1970 1 1 0 0 0) = 0.) "to_unixfloat 1 Jan 1970"; + test (from_unixfloat 0. = make 1970 1 1 0 0 0) "from_unixfloat 1 Jan 1970"; + test (Utils.Float.equal (to_unixfloat (make 2004 11 13 19 17 9)) 1100373429.) + "to_unixfloat"; + test (equal (from_unixfloat 1100373429.) (make 2004 11 13 19 17 9)) + "from_unixfloat"; + test (from_unixtm (to_unixtm (make 2003 7 16 23 22 21)) = + make 2003 7 16 23 22 21) + "from_unixtm to_unixtm = id"; + + test (Period.to_time (Period.second 30) = Time.Period.second 30) + "Period.to_time second"; + test (Period.safe_to_time (Period.second 30) = Time.Period.second 30) + "Period.safe_to_time second"; + test (Period.to_time (Period.day 6) = Time.Period.second 518400) + "Period.to_time day"; + test (Period.safe_to_time (Period.day 6) = Time.Period.second 518400) + "Period.safe_to_time day"; + Gen_test.test_exn (lazy (Period.to_time (Period.year 1))) "Period.to_time year"; + test (Period.ymds (Period.make 1 2 3 1 2 3) = (1, 2, 3, 3723)) "Period.ymds"; + test + (Period.ymds (Period.make (-1) (-2) (-3) (-1) (-2) (-3)) = (-1,-2,-4,82677)) + "Period.ymds neg"; + () + +let suite = ["pcalendar", `Quick, test] diff --git a/tests/test_printer.ml b/tests/test_printer.ml index fd4768f..4ef7148 100644 --- a/tests/test_printer.ml +++ b/tests/test_printer.ml @@ -20,107 +20,103 @@ (* LICENSE. *) (**************************************************************************) -Printf.printf "Tests of Printer:\n";; - open CalendarLib;; -include Gen_test;; -reset ();; - open Printer.Date;; -let d = Date.make 2003 1 6;; -test (sprint "%D" d = "01/06/03") "sprint %D";; -test (sprint "the date is %B, the %-dth" d = "the date is January, the 6th") - "sprint (long sentence)";; -test (sprint "%^B, the %0dth" d = "JANUARY, the 06th") "sprint padding";; -test (sprint "%j" d = "006") "sprint %j";; -test (sprint "%-j" d = "6") "sprint %j";; -test (sprint "%_j" d = " 6") "sprint %j";; -test (sprint "%j" (Date.make 2003 1 10) = "010") "sprint %j";; -test (sprint "%-j" (Date.make 2003 1 10) = "10") "sprint %j";; -test (sprint "%_j" (Date.make 2003 1 10) = " 10") "sprint %j";; -test (sprint "%C" (Date.make 2008 12 5) = "21") "sprint %C";; -test (from_string "2003-01-06" = Date.make 2003 1 6) "from_string";; -test (from_fstring "%y-%m-%d" "03-01-06" = Date.make 1903 1 6) "from_fstring";; -test - (from_fstring "%Y%t%m%t%d" "1903\t01\t06" = Date.make 1903 1 6) - "from_fstring %t";; -test - (from_fstring "%Y-%B-%d" "2007-May-14" = Date.make 2007 5 14) - "from_fstring %B";; -test - (from_fstring "%Y-%b-%d" "2007-Jan-14" = Date.make 2007 1 14) - "from_fstring %B";; +let test () = + let test x s = Alcotest.(check bool) s true x in + let d = Date.make 2003 1 6 in + test (sprint "%D" d = "01/06/03") "sprint %D"; + test (sprint "the date is %B, the %-dth" d = "the date is January, the 6th") + "sprint (long sentence)"; + test (sprint "%^B, the %0dth" d = "JANUARY, the 06th") "sprint padding"; + test (sprint "%j" d = "006") "sprint %j"; + test (sprint "%-j" d = "6") "sprint %j"; + test (sprint "%_j" d = " 6") "sprint %j"; + test (sprint "%j" (Date.make 2003 1 10) = "010") "sprint %j"; + test (sprint "%-j" (Date.make 2003 1 10) = "10") "sprint %j"; + test (sprint "%_j" (Date.make 2003 1 10) = " 10") "sprint %j"; + test (sprint "%C" (Date.make 2008 12 5) = "21") "sprint %C"; + test (from_string "2003-01-06" = Date.make 2003 1 6) "from_string"; + test (from_fstring "%y-%m-%d" "03-01-06" = Date.make 1903 1 6) "from_fstring"; + test + (from_fstring "%Y%t%m%t%d" "1903\t01\t06" = Date.make 1903 1 6) + "from_fstring %t"; + test + (from_fstring "%Y-%B-%d" "2007-May-14" = Date.make 2007 5 14) + "from_fstring %B"; + + test + (from_fstring "%Y-%b-%d" "2007-Jan-14" = Date.make 2007 1 14) + "from_fstring %B"; -test (from_fstring "%Y %V %w" "2004 01 1" = Date.make 2003 12 29) - "from_fstring %Y %V %w";; -test (from_fstring "%V %Y %w" "52 1999 7" = Date.make 2000 1 2) - "from_fstring %V %Y %w";; -test_exn (lazy (from_fstring "%Y %w" "1999 7")) "from_fstring_exn";; -test (from_fstring "%Y%j" "1903001" = Date.make 1903 1 1) "from_fstring %Y%j";; -test (from_fstring "%j%Y" "0011903" = Date.make 1903 1 1) "from_fstring %j%Y";; -test_exn (lazy (from_fstring "%j" "001")) "from_fstring_exn 2";; + test (from_fstring "%Y %V %w" "2004 01 1" = Date.make 2003 12 29) + "from_fstring %Y %V %w"; + test (from_fstring "%V %Y %w" "52 1999 7" = Date.make 2000 1 2) + "from_fstring %V %Y %w"; + Gen_test.test_exn (lazy (from_fstring "%Y %w" "1999 7")) "from_fstring_exn"; + test (from_fstring "%Y%j" "1903001" = Date.make 1903 1 1) "from_fstring %Y%j"; + test (from_fstring "%j%Y" "0011903" = Date.make 1903 1 1) "from_fstring %j%Y"; + Gen_test.test_exn (lazy (from_fstring "%j" "001")) "from_fstring_exn 2"; -open Printer.Time;; -test (to_string (Time.make 12 1 4) = "12:01:04") "to_string (on TimePrinter)";; -test (sprint "%I" (Time.make 36 4 3) = "12") "sprint %I (on TimePrinter)";; -test (sprint "%r" (Time.make 24 4 3) = "12:04:03 AM") - "sprint %r (on TimePrinter)";; -test (sprint "%R %z" (Time.make 12 24 5) = "12:24 +0000") "sprint %R %z";; -test - (Time_Zone.on (fun () -> sprint "%R %z" (Time.make 12 24 5)) - (Time_Zone.UTC_Plus (-3)) () = "12:24 -0300") - "sprint %R %z neg";; -test (sprint "%R %S %:z" (Time.make 23 47 55) = "23:47 55 +00:00") - "sprint %R %S %:z";; -test - (Time_Zone.on (fun () -> sprint "%R %S %::z" (Time.make 7 47 55)) - (Time_Zone.UTC_Plus 3) () = "07:47 55 +03:00:00") - "sprint %R %S %::z";; -test_exn (lazy (sprint "%R %:a" (Time.make 23 47 55))) "sprint %R %:a";; -test_exn (lazy (sprint "%::::z %R" (Time.make 23 47 55))) "sprint %::::z %R";; + let open Printer.Time in + test (to_string (Time.make 12 1 4) = "12:01:04") "to_string (on TimePrinter)"; + test (sprint "%I" (Time.make 36 4 3) = "12") "sprint %I (on TimePrinter)"; + test (sprint "%r" (Time.make 24 4 3) = "12:04:03 AM") + "sprint %r (on TimePrinter)"; + test (sprint "%R %z" (Time.make 12 24 5) = "12:24 +0000") "sprint %R %z"; + test + (Time_Zone.on (fun () -> sprint "%R %z" (Time.make 12 24 5)) + (Time_Zone.UTC_Plus (-3)) () = "12:24 -0300") + "sprint %R %z neg"; + test (sprint "%R %S %:z" (Time.make 23 47 55) = "23:47 55 +00:00") + "sprint %R %S %:z"; + test + (Time_Zone.on (fun () -> sprint "%R %S %::z" (Time.make 7 47 55)) + (Time_Zone.UTC_Plus 3) () = "07:47 55 +03:00:00") + "sprint %R %S %::z"; + Gen_test.test_exn (lazy (sprint "%R %:a" (Time.make 23 47 55))) "sprint %R %:a"; + Gen_test.test_exn (lazy (sprint "%::::z %R" (Time.make 23 47 55))) "sprint %::::z %R"; -test (from_fstring "%R %S %z" "10:47 55 -0300" = Time.make 13 47 55) - "from_fstring %R %S %z";; -test (from_fstring "%R %S %:z" "10:47 55 -13:00" = Time.make 23 47 55) - "from_fstring %R %S %:z";; -test_exn (lazy (from_fstring "%R %S %:z" "10:47 55 -0300")) - "from_fstring %R %S %:z bug1";; -test_exn (lazy (from_fstring "%R %S %:z" "10:47 55 -03:00:00")) - "from_fstring %R %S %:z bug2";; -test (from_fstring "%R %S %::z" "10:47 55 +03:00:00" = Time.make 7 47 55) - "from_fstring %R %S %::z";; -test (from_fstring "%R %S %:::z" "10:47 55 -03" = Time.make 13 47 55) - "from_fstring %R %S %:::z";; -test_exn (lazy (from_fstring "%R %S %::::z" "10:47 55 -0300")) - "from_fstring %R %S %::::z";; -test (from_fstring "%r" "10:47:25 AM" = Time.make 10 47 25) - "from_fstring AM (on TimePrinter)";; -test (from_fstring "%r" "10:47:25 PM" = Time.make 22 47 25) - "from_fstring PM (on TimePrinter)";; -test_exn (lazy (from_fstring "%p %I:%M:%S" "TM 5:26:17")) - "from_fstring error on %p (on TimePrinter)";; + test (from_fstring "%R %S %z" "10:47 55 -0300" = Time.make 13 47 55) + "from_fstring %R %S %z"; + test (from_fstring "%R %S %:z" "10:47 55 -13:00" = Time.make 23 47 55) + "from_fstring %R %S %:z"; + Gen_test.test_exn (lazy (from_fstring "%R %S %:z" "10:47 55 -0300")) + "from_fstring %R %S %:z bug1"; + Gen_test.test_exn (lazy (from_fstring "%R %S %:z" "10:47 55 -03:00:00")) + "from_fstring %R %S %:z bug2"; + test (from_fstring "%R %S %::z" "10:47 55 +03:00:00" = Time.make 7 47 55) + "from_fstring %R %S %::z"; + test (from_fstring "%R %S %:::z" "10:47 55 -03" = Time.make 13 47 55) + "from_fstring %R %S %:::z"; + Gen_test.test_exn (lazy (from_fstring "%R %S %::::z" "10:47 55 -0300")) + "from_fstring %R %S %::::z"; + test (from_fstring "%r" "10:47:25 AM" = Time.make 10 47 25) + "from_fstring AM (on TimePrinter)"; + test (from_fstring "%r" "10:47:25 PM" = Time.make 22 47 25) + "from_fstring PM (on TimePrinter)"; + Gen_test.test_exn (lazy (from_fstring "%p %I:%M:%S" "TM 5:26:17")) + "from_fstring error on %p (on TimePrinter)"; -open Printer.Calendar;; -test (sprint "%c" (Calendar.make 2003 1 6 12 1 4) = "Mon Jan 06 12:01:04 2003") - "sprint %c";; -test (to_string (Calendar.make 2004 10 25 24 0 1) = "2004-10-26 00:00:01") - "to_string (on CalendarPrinter)";; -test - (from_fstring "%c" "Mon May 14 10:30:00 2007" - = Calendar.make 2007 5 14 10 30 0) - "from_fstring (on CalendarPrinter)";; -test (sprint "%s" (Calendar.make 1971 1 1 0 0 0) = "31536000") - "sprint %s";; + let open Printer.Calendar in + test (sprint "%c" (Calendar.make 2003 1 6 12 1 4) = "Mon Jan 06 12:01:04 2003") + "sprint %c"; + test (to_string (Calendar.make 2004 10 25 24 0 1) = "2004-10-26 00:00:01") + "to_string (on CalendarPrinter)"; + test + (from_fstring "%c" "Mon May 14 10:30:00 2007" + = Calendar.make 2007 5 14 10 30 0) + "from_fstring (on CalendarPrinter)"; + test (sprint "%s" (Calendar.make 1971 1 1 0 0 0) = "31536000") + "sprint %s"; -test (Utils.Float.equal - (Ftime.second - (Printer.Ftime.from_fstring - "%Y-%m-%dT%H:%M:%S%:z" "2014-03-19T15:51:25.05-07:00")) - 25.05) - "from_string with floating seconds";; + test (Utils.Float.equal + (Ftime.second + (Printer.Ftime.from_fstring + "%Y-%m-%dT%H:%M:%S%:z" "2014-03-19T15:51:25.05-07:00")) + 25.05) + "from_string with floating seconds"; + () -let ok = nb_ok ();; -let bug = nb_bug ();; -Printf.printf "tests ok : %d; tests ko : %d\n" ok bug;; -flush stdout;; +let suite = ["printer", `Quick, test] diff --git a/tests/test_time.ml b/tests/test_time.ml index ba2fd37..211e48a 100644 --- a/tests/test_time.ml +++ b/tests/test_time.ml @@ -20,58 +20,57 @@ (* LICENSE. *) (**************************************************************************) -(*i $Id: test_time.ml 259 2014-10-29 10:00:46Z signoles $ i*) - -Printf.printf "Tests of Time:\n";; +(*i $Id$ i*) open CalendarLib open Time;; -include Gen_test;; -reset ();; -Time_Zone.change (Time_Zone.UTC_Plus 10);; +let test () = + let test x s = Alcotest.(check bool) s true x in + Time_Zone.change (Time_Zone.UTC_Plus 10); + + test (make 30 60 80 = make 31 1 20) "30-60-80 = 31-1-20"; + test (normalize (make 22 0 0) = (make 22 0 0, 0)) "normalize 22-0-0"; + test (normalize (make 73 0 0) = (make 1 0 0, 3)) "normalize 73-0-0"; + test (normalize (make (-73) 0 0) = (make 23 0 0, -4)) "normalize (-73)-0-0"; + test (add (make 20 0 0) (Period.minute 70) = make 21 10 0) "add 20-0-0 70mn"; + test (next (make 20 3 31) `Minute = make 20 4 31) "next 20-3-31 `Minute"; + test (prev (make 20 3 31) `Second = make 20 3 30) "prev 20-3-31 `Second"; + test (sub (make 6 5 4) (make 4 5 6) = Period.make 1 59 58) "sub 6-5-4 4-5-6"; + test (convert (make 20 0 0) (Time_Zone.UTC_Plus 2) (Time_Zone.UTC_Plus 4) = + make 22 0 0) "convert"; + test (to_gmt (make 20 0 0) = make 10 0 0) "to_gmt"; + test (from_gmt (make 20 0 0) = make 30 0 0) "from_gmt"; + test (midnight () = make 0 0 0) "midnight"; + test (midday () = make 12 0 0) "midday"; + test (hour (make 20 0 0) = 20) "hour"; + test (minute (make 20 10 0) = 10) "minute"; + test (second (make 20 10 5) = 5) "second"; -test (make 30 60 80 = make 31 1 20) "30-60-80 = 31-1-20";; -test (normalize (make 22 0 0) = (make 22 0 0, 0)) "normalize 22-0-0";; -test (normalize (make 73 0 0) = (make 1 0 0, 3)) "normalize 73-0-0";; -test (normalize (make (-73) 0 0) = (make 23 0 0, -4)) "normalize (-73)-0-0";; -test (add (make 20 0 0) (Period.minute 70) = make 21 10 0) "add 20-0-0 70mn";; -test (next (make 20 3 31) `Minute = make 20 4 31) "next 20-3-31 `Minute"; -test (prev (make 20 3 31) `Second = make 20 3 30) "prev 20-3-31 `Second";; -test (sub (make 6 5 4) (make 4 5 6) = Period.make 1 59 58) "sub 6-5-4 4-5-6";; -test (convert (make 20 0 0) (Time_Zone.UTC_Plus 2) (Time_Zone.UTC_Plus 4) = - make 22 0 0) "convert";; -test (to_gmt (make 20 0 0) = make 10 0 0) "to_gmt";; -test (from_gmt (make 20 0 0) = make 30 0 0) "from_gmt";; -test (midnight () = make 0 0 0) "midnight";; -test (midday () = make 12 0 0) "midday";; -test (hour (make 20 0 0) = 20) "hour";; -test (minute (make 20 10 0) = 10) "minute";; -test (second (make 20 10 5) = 5) "second";; + let one_two_three = make 1 2 3 in + test (to_seconds one_two_three = 3723) "to_seconds"; + test (Utils.Float.equal (to_minutes one_two_three) 62.05) "to_minutes"; + test (to_hours (make 1 3 0) = 1.05) "to_hours"; + test (from_seconds 3723 = from_minutes 62.05) "from_seconds; from_minutes"; + test (from_hours 1.05 = make 1 3 0) "from_hours"; + test (is_pm (midnight ())) "is_pm midnight"; + test (is_pm (make 10 0 0)) "is_pm 10-0-0"; + test (is_pm (make 34 0 0)) "is_pm 34-0-0"; + test (not (is_pm (make (- 10) 0 0))) "not (is_pm (- 10) 0 0)"; + test (is_am (midday ())) "is_am midday"; + test (is_am (make 20 0 0)) "is_am 20-0-0"; + test (is_am (make (- 34) 0 0)) "is_am (- 34) 0 0"; + test (not (is_am (make 34 0 0))) "not (is_pm 34 0 0)"; -let one_two_three = make 1 2 3;; -test (to_seconds one_two_three = 3723) "to_seconds";; -test (Utils.Float.equal (to_minutes one_two_three) 62.05) "to_minutes";; -test (to_hours (make 1 3 0) = 1.05) "to_hours";; -test (from_seconds 3723 = from_minutes 62.05) "from_seconds; from_minutes";; -test (from_hours 1.05 = make 1 3 0) "from_hours";; -test (is_pm (midnight ())) "is_pm midnight";; -test (is_pm (make 10 0 0)) "is_pm 10-0-0";; -test (is_pm (make 34 0 0)) "is_pm 34-0-0";; -test (not (is_pm (make (- 10) 0 0))) "not (is_pm (- 10) 0 0)";; -test (is_am (midday ())) "is_am midday";; -test (is_am (make 20 0 0)) "is_am 20-0-0";; -test (is_am (make (- 34) 0 0)) "is_am (- 34) 0 0";; -test (not (is_am (make 34 0 0))) "not (is_pm 34 0 0)";; + let one_two_three = Period.make 1 2 3 in + test (Period.to_seconds one_two_three = 3723) "Period.to_seconds"; + test (Utils.Float.equal (Period.to_minutes one_two_three) 62.05) + "Period.to_minutes"; + test (Utils.Float.equal (Period.to_hours (Period.make 1 3 0)) 1.05) + "Period.to_hours"; + () -let one_two_three = Period.make 1 2 3;; -test (Period.to_seconds one_two_three = 3723) "Period.to_seconds";; -test (Utils.Float.equal (Period.to_minutes one_two_three) 62.05) - "Period.to_minutes";; -test (Utils.Float.equal (Period.to_hours (Period.make 1 3 0)) 1.05) - "Period.to_hours";; -let ok = nb_ok ();; -let bug = nb_bug ();; -Printf.printf "tests ok : %d; tests ko : %d\n" ok bug;; -flush stdout;; +let suite = [ + "time", `Quick, test; +] diff --git a/tests/test_timezone.ml b/tests/test_timezone.ml index 940a460..16143f2 100644 --- a/tests/test_timezone.ml +++ b/tests/test_timezone.ml @@ -20,30 +20,28 @@ (* LICENSE. *) (**************************************************************************) -(*i $Id: test_timezone.ml 259 2014-10-29 10:00:46Z signoles $ i*) - -Printf.printf "Tests of Time_Zone:\n";; +(*i $Id$ i*) open CalendarLib open Time_Zone;; -include Gen_test;; -reset ();; -test (current () = UTC) "current () = UTC";; -change Local;; -test (current () = Local) "current () = Local";; -test (gap UTC (UTC_Plus (-5)) = -5) "gap UTC (UTC_Plus (-5)) = -5";; -let g6 = UTC_Plus 6;; -test - (gap g6 Local = gap g6 UTC + gap UTC Local) - "gap g6 Local = gap g6 UTC + gap UTC Local";; -test_exn (lazy (change (UTC_Plus 13))) "change 13";; -test_exn (lazy (change (UTC_Plus (-15)))) "change (-15)";; -change (UTC_Plus 4);; -test (from_gmt () = 4) "from_gmt () = 4";; -test (to_gmt () = -4) "to_gmt () = -4";; +let tz = Alcotest.testable (Fmt.always "timezone") (=) ;; + +let test () = + change UTC; + Alcotest.(check tz) "current () = UTC" UTC (current ()); + change Local; + Alcotest.(check tz) "current () = Local" Local (current ()); + Alcotest.(check int) "gap UTC (UTC_Plus (-5)) = -5" ~-5 (gap UTC (UTC_Plus ~-5)); + let g6 = UTC_Plus 6 in + Alcotest.(check int) + "gap g6 Local = gap g6 UTC + gap UTC Local" + (gap g6 Local) (gap g6 UTC + gap UTC Local); + Gen_test.test_exn (lazy (change (UTC_Plus 13))) "change 13"; + Gen_test.test_exn (lazy (change (UTC_Plus (-15)))) "change (-15)"; + change (UTC_Plus 4); + Alcotest.(check int) "from_gmt () = 4" 4 (from_gmt ()) ; + Alcotest.(check int) "to_gmt () = -4" ~-4 (to_gmt ()); + () -let ok = nb_ok ();; -let bug = nb_bug ();; -Printf.printf "tests ok : %d; tests ko : %d\n" ok bug;; -flush stdout;; +let suite = ["timezone", `Quick, test] -- cgit v1.2.3