Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
HTTP timestamp decoders and encoders complaint to RFC 9110 (HTTP Semantics). It is designed to be used with HTTP Date header field.
The current supported formats for decoding/encoding are as follows:
Sun, 06 Nov 1994 08:49:37 GMTSunday, 06-Nov-94 08:49:37 GMTSun Nov 6 08:49:37 1994API usage:
# let imf_fixdate = Http_date.decode "Sun, 06 Nov 1994 08:49:37 GMT";;
val imf_fixdate : Http_date.t = `IMF (`Sun, (1994, 11, 6), (8, 49, 37))
# Http_date.encode imf_fixdate;;
- : string = "Sun, 06 Nov 1994 08:49:37 GMT"References:
opam install http-dateSpecify the dependency in dune executable or library stanza as follows:
executable(executable
(name hello)
(libraries http-date))library (library
(name hello)
(libraries http-date))