Http_dateHTTP-date parsing per RFC 9110 Section 5.6.7
This module provides parsing of HTTP date strings as defined in RFC 9110. It supports three date formats:
val src : Logs.Src.tLog source for HTTP date parsing
val parse : string -> Ptime.t optionParse an HTTP-date string to Ptime.t.
parse s attempts to parse the string s as an HTTP-date using the three supported formats. Returns None if parsing fails.
Examples:
parse "Sun, 06 Nov 1994 08:49:37 GMT" (* RFC 1123 *)
parse "Sunday, 06-Nov-94 08:49:37 GMT" (* RFC 850 *)
parse "Sun Nov 6 08:49:37 1994" (* asctime *)