Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#28447 closed enhancement (fixed)

Add ISO's YYYY-MM-DD date format to general settings

Reported by: mattheweppelsheimer's profile mattheweppelsheimer Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.0 Priority: normal
Severity: normal Version:
Component: Date/Time Keywords: has-patch commit
Focuses: Cc:

Description

The ISO's 8601 specification states that digitized dates should be specified in most to least significant time period, separated by hyphens. YYYY-MM-DD is the recommended format. The closest default we have currently is YYYY/MM/DD, but I'd like to see this international standard represented in the default list.

Wikipedia's page (accessed 2014-06-03) has more information — see the third bullet of General Principles. Here is the ISO's 8601 FAQ page.

This patch adds this standard format to the default array of date formats.

Attachments (3)

28447.diff (731 bytes) - added by mattheweppelsheimer 11 years ago.
28447.patch (570 bytes) - added by gauravmittal1995 11 years ago.
Replacing of a/b/c format with a-b-c" format.
28447(2).patch (570 bytes) - added by gauravmittal1995 11 years ago.
According to he more popular choices (refer: http://en.wikipedia.org/wiki/Date_format_by_country#Listing )

Download all attachments as: .zip

Change History (15)

#1 @mattheweppelsheimer
11 years ago

  • Keywords has-patch added

Attached patch.

First time patcher! ;-)

#2 @SergeyBiryukov
11 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 4.0

#3 @DrewAPicture
11 years ago

28447.diff looks good to me. +1 for commit.

#4 @SergeyBiryukov
11 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 28820:

Add ISO date standard YYYY-MM-DD format to general settings.

props mattheweppelsheimer.
fixes #28447.

#5 @helen
11 years ago

Can we move this up to be next to the Y/m/d option? I also feel like this somehow tips into being too heavy - not sure if another option could be eliminated.

#6 @SergeyBiryukov
11 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#7 follow-up: @gauravmittal1995
11 years ago

If we are including the "Y-m-d" format, do we remove the Y/m/d format?
ALso we can replace the "m/d/Y" and "d/m/Y" with "m-d-Y" and "d-m-Y". This will go well with the "Decisions, not options" philosophy.

@gauravmittal1995
11 years ago

Replacing of a/b/c format with a-b-c" format.

This ticket was mentioned in IRC in #wordpress-dev by gauravmittal_. View the logs.


11 years ago

#9 in reply to: ↑ 7 @SergeyBiryukov
11 years ago

Replying to gauravmittal1995:

If we are including the "Y-m-d" format, do we remove the Y/m/d format?
ALso we can replace the "m/d/Y" and "d/m/Y" with "m-d-Y" and "d-m-Y". This will go well with the "Decisions, not options" philosophy.

m/d/Y appears to be a common format in the United States. We could probably replace Y/m/d with Y-m-d though. For reference: http://en.wikipedia.org/wiki/Date_format_by_country#Listing.

@gauravmittal1995
11 years ago

According to he more popular choices (refer: http://en.wikipedia.org/wiki/Date_format_by_country#Listing )

#10 @SergeyBiryukov
11 years ago

28447(2).patch looks good to me.

According to the listing above, Y-m-d is definitely more popular than Y/m/d. Translation teams can still set their own preferred format in language files by translating the default format, F j, Y.

#11 @SergeyBiryukov
11 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 28848:

Replace Y/m/d date format in general settings with a more popular one, Y-m-d.

props gauravmittal1995.
fixes #28447.

#12 @mattheweppelsheimer
11 years ago

+1 to replacing Y/m/d with Y-m-d.

Note: See TracTickets for help on using tickets.