fixdate
Format and parse HTTP-date timestamps (RFC 9110, section 5.6.7), the
format used by HTTP headers such as Date, Last-Modified, and
Expires.
Values
pub fn parse(input: String) -> Result(timestamp.Timestamp, Nil)
Parse an HTTP-date into a Timestamp. Accepts all three formats in
RFC 9110: IMF-fixdate, the obsolete RFC 850 (2-digit year), and
asctime. Returns Error(Nil) on malformed or out-of-range input.
parse("Mon, 29 Jun 2026 01:49:08 GMT")
// -> Ok(timestamp.from_unix_seconds(1_782_697_748))
pub fn to_string(timestamp: timestamp.Timestamp) -> String
Render a Timestamp as an RFC 9110 IMF-fixdate string.
to_string(timestamp.from_unix_seconds(1_782_697_748))
// -> "Mon, 29 Jun 2026 01:49:08 GMT"