Theme Layout

Boxed or Wide or Framed

Wide

Theme Translation

Display Featured Slider

Featured Slider Styles

Display Grid Slider

yes

Grid Slider Styles

Display Trending Posts

Display Author Bio

Display Instagram Footer

off

Dark or Light Style

Light

Blog Archive

Powered by Blogger.

Wednesday, February 15, 2017

[JavaScript] Date Formats


# JavaScript Date Formats


● JavaScript Date Input

 There are generally 4 types of JSP date Input formats.

https://www.w3schools.com/js/js_date_formats.asp

The ISO format follows a strict standard in JSP.
The other formats are not so well defined and might be browser specific.

● JavaScript Date Output

 Independent of input format, JSP will output dates in full text string format (default).

● JavaScript ISO Dates

ISO 8601 is the international standard for the representation of dates and times.
The ISO 8601 syntax (YYYY-MM-DD) is also the preferred JSP date Format.


ISO dates can be written without day / month and day.
also, ISO dates can be written with added hours, minutes, and seconds.
(YYYY-MM-DDTHH:MM:SSZ).
 Date and time is separated with a capital T.
 UTC time is defined with a capital Z.

● Time Zones

 When setting a date, without specifying the time zone, JSP will use the browser's time zone. When getting a date, without specifying the time zone, the result is converted to the browser's time zone.

● JavaScript Short Dates.

 Short dates are written with an "MM/DD/YYYY" syntax.


● JavaScript Long Dates.

 Long dates are most often written with a "MMM DD YYYY" syntax.


● JavaScript Full Date

 JavaScript will accept date strings in "full JSP format".

https://www.w3schools.com/js/js_date_formats.asp

QuickEdit
Unknown
0 Comments
Share This Post :

You Might Also Like

No comments:

Post a Comment

Follow @SunriseSunsetBlog