Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
date.ml1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68open Js_of_ocaml type t = Js.date Js.t let now (): t = new%js Js.date_now let make (year: int) (month: int) (day: int) (hour: int) (minute: int) (second: int) (milli: int) : t = new%js Js.date_ms year month day hour minute second milli let of_value (v: float): t = new%js Js.date_fromTimeValue v let value (d: t): float = d##valueOf let zone_offset (d: t): int = d##getTimezoneOffset let add (ms: float) (d: t): t = of_value (value d +. ms) let day (d: t): int = d##getDay let date (d: t): int = d##getDate let month (d: t): int = d##getMonth let year (d: t): int = d##getFullYear let hours (d: t): int = d##getHours let minutes (d: t): int = d##getMinutes let seconds (d: t): int = d##getSeconds let milliseconds (d: t): int = d##getMilliseconds