API document "Date" field

Last updated:2021-03-29 14:55:24

GMT formats for a date field in an API document

A date field must use one of the Greenwich Mean Time (GMT) formats supported by HTTP1.1. For more information about the formats, see HTTP1.1 parameters.

The following line shows the three formats:
HTTP-date = rfc1123-date | rfc850-date | asctime_date

Format 1

rfc1123-date = wkday "," SP day(2) SP month SP year(4) SP time SP "GMT"

A number in parentheses indicates the number of characters.
Example: Thu, 26 Sep 2018 15:30:26 GMT

Format 2

rfc850-date = weekday "," SP day(2) "-" month "-" year(2) SP time SP "GMT"

A number in parentheses indicates the number of characters.
Example: Thursday, 26-Sep-18 15:30:26 GMT

Format 3

asctime-date = wkday SP month SP day(2 | SP 1) SP time SP year(4)

For a single-digit date value, a leading zero is not permitted. Enter a space as the placeholder.
A number in parentheses indicates the number of characters.
Example: Thu Sep  8 15:30:26 2018

Syntax description

  • SP: Refers to spaces.
  • time = hh(2) “:” mm(2) “:” ss(2), in the range of 00:00:00 to 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”

Did you find the above information helpful?

Unhelpful
Mostly Unhelpful
A little helpful
Helpful
Very helpful

What might be the problems?

Insufficient
Outdated
Unclear or awkward
Redundant or clumsy
Lack of context for the complex system or functionality

More suggestions

0/200

Please give us your feedback.

Submitted

Thank you for your feedback.

问题反馈