HTTP dates

Author(s): The Ciao Development Team.

Parser/printer for dates in the HTTP protocol.

The format of dates in HTTP/1.1 (RFC1123 and RFC850) (see RFC2616) is the following:

HTTP-date    = rfc1123-date | rfc850-date | asctime-date
rfc1123-date = wkday "," SP date1 SP time SP "GMT"
rfc850-date  = weekday "," SP date2 SP time SP "GMT"
asctime-date = wkday SP date3 SP time SP 4DIGIT
date1        = 2DIGIT SP month SP 4DIGIT
               ; day month year (e.g., 02 Jun 1982)
date2        = 2DIGIT "-" month "-" 2DIGIT
               ; day-month-year (e.g., 02-Jun-82)
date3        = month SP ( 2DIGIT | ( SP 1DIGIT ))
               ; month day (e.g., Jun  2)
time         = 2DIGIT ":" 2DIGIT ":" 2DIGIT
               ; 00:00:00 - 23:59:59
wkday        = "Mon" | "Tue" | "Wed"
             | "Thu" | "Fri" | "Sat" | "Sun"
weekday      = "Monday" | "Tuesday" | "Wednesday"
             | "Thursday" | "Friday" | "Saturday" | "Sunday"
month        = "Jan" | "Feb" | "Mar" | "Apr"
             | "May" | "Jun" | "Jul" | "Aug"
             | "Sep" | "Oct" | "Nov" | "Dec"

Usage and interface

Documentation on exports

http_date(Date)

Date is a term defined as

http_date(date(WeekDay,Day,Month,Year,Time)) :-
        weekday(WeekDay),
        int(Day),
        month(Month),
        int(Year),
        hms_time(Time).
.

Usage:http_date(Date)

Date is a term denoting a date.

    REGTYPEweekday/1

    Usage:weekday(WeekDay)

    WeekDay is a term denoting a weekday.

      REGTYPEmonth/1

      Usage:month(Month)

      Month is a term denoting a month.

        REGTYPEhms_time/1

        Usage:hms_time(Time)

        Time is an atom of the form hh:mm:ss

          No further documentation available for this predicate.

          Documentation on imports

          This module has the following direct dependencies: