I have confused about globalize format d.
What is the usage of Globalize.format(new Date(), 'd')
.
it returns the current date with label format as month/date/year..
I have confused about globalize format d.
What is the usage of Globalize.format(new Date(), 'd')
.
it returns the current date with label format as month/date/year..
The code you list is returning the date using the Standard Date and Time format 'd'. The 'd', is for short date format. This page MSDN Format page lists different formats.
jQuery globalize regarding DATE:
Default globalize culture is "English". So we can get the dates in the following format using the jQuery globalize.format
.
Globalize.format(new Date(), 'd'); //Result - 5/23/2016
Globalize.format(new Date(), 'D'); //Result - Monday, May 23, 2016
Globalize.format(new Date(), 'M'); //Result - May 23
We can also format the NUMBER using jQuery globalize. More information