1

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..

Chris Salzberg
  • 27,099
  • 4
  • 75
  • 82
Akbar Basha
  • 1,168
  • 1
  • 16
  • 38

2 Answers2

2

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.

Philip Tinney
  • 1,986
  • 17
  • 19
  • Thanks for u r concern..but u shown as C# it's same for jquery ? – Akbar Basha May 23 '16 at 04:21
  • The formats are based on I believe the ISO 8601 standard. That is the only page I can find mentioning the short format. I've been searching, but that is about all I can find. I've searched for standard date format aliases and my googling abilities are not turning anything else up. – Philip Tinney May 23 '16 at 05:46
1

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

Fiddle Sample

We can also format the NUMBER using jQuery globalize. More information

John R
  • 2,741
  • 2
  • 13
  • 32