Expand description
HTTP dates: Date, Last-Modified, If-Modified-Since, Expires.
RFC 9110 §5.6.7 has one format for sending — IMF-fixdate,
Sun, 06 Nov 1994 08:49:37 GMT — and two obsolete ones a recipient must
still accept: RFC 850’s Sunday, 06-Nov-94 08:49:37 GMT and C’s asctime,
Sun Nov 6 08:49:37 1994. Nothing has sent the old two in decades, but a
validator that rejects them makes a conditional request unconditional, and
the client pays for a body it already had.
Functions§
- http_
date - Format a unix timestamp as an HTTP date (RFC 7231 IMF-fixdate).
- parse_
http_ date - Parse any of the three HTTP date formats to a unix timestamp.
- parse_
ymd YYYY-MM-DDat midnight UTC, as a unix timestamp.