HTTP headers | Date

Description:
HTTP headers are used to pass additional information with HTTP response or HTTP request. Date HTTP header contains the date and time at which the message was generated. It is supported by all the browsers.

Syntax:

Date: day-name, day month year hour:minute:second GMT

Directives:



  • day-name: It is case sensitive directive and specifies the day name when message was generated. The values it can have “Mon”, “Tue”, “Wed”, “Thu”, “Fri”, “Sat”, or “Sun” as value.
  • day: It specifies the day of month in 2 digit format. It can have values ranging from ’00’ to ’31’. For ex. 01, 21, 29
  • month: It specifies the month name and is case sensitive. It can have “Jan”, “Feb”, “Mar”, “Apr”, “May”, “Jun”, “Jul”, “Aug”, “Sep”, “Oct”, “Nov”, “Dec” as value.
  • year: It specifies the year in 4 digit format. For ex 2019, 2018.
  • hour: It specifies hour in 24 hour, 2 digit format. It can have values ranging from ’00’ to ’23’. For ex. 10, 21
  • minute: It specifies minute in 2 digit format. It can have values ranging from ’00’ to ’59’. For ex. 05, 21
  • second: It specifies second in 2 digit format. It can have values ranging from ’00’ to ’59’. For ex. 05, 21
  • GMT: GMT stands for Greenwich mean time.

Example:

Date: Wed, 16 Oct 2019 07:28:00 GMT 

Supported Browsers: The browsers compatible with HTTP headers date are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Safari
  • Opera


My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.