def cookie.date

bend-kit-http@0.38.4.0 · http.bend:2142

import bend-kit-http@0.38.4.0/http.bend as Http
import Base
import bend-kit-time@0.3.0.0/time.bend as Time

2142# §5.1.1: a cookie-date such as "Sun, 06 Nov 1994 08:49:37 GMT" or "Thu, 01-Jan-70 00:00:01 GMT".
2143# Time.mk refuses a day past the month's end and a time past 23:59:59.
2144def cookie.date(s: String) -> Maybe<&2, Time.Instant>:
2145  cookie.date.fin(cookie.date.fold(List.reverse(&2, String, cookie.date.tokens(s, (SNil{}, Nil{}))), Cdate{None{}, None{}, None{}, None{}}))

Uses (10)

Used by (1)