Skip to content

Fixed date format to correct format. Plays well with jquery globalize. #1595

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

jspeaker
Copy link

The date format has been changed to the correct format per wikipedia. This date format integrates correctly with the jquery globalize plugin, which is the problem I needed to resolve for integration.
https://en.wikipedia.org/wiki/Date_and_time_notation_in_South_Korea

@jquerybot
Copy link

Thank you for your pull request. It looks like this may be your first contribution to a jQuery Foundation project, if so we need you to sign our Contributor License Agreement (CLA).

📝 Please visit http://contribute.jquery.org/CLA/ to sign.

After you signed, the PR is checked again automatically after a minute. If there's still an issue, please reply here to let us know.


If you've already signed our CLA, it's possible your git author information doesn't match your CLA signature (both your name and email have to match), for more information, check the status of your CLA check.

@jspeaker jspeaker force-pushed the datepicker-globalize-ko-dateformat branch from 63a8777 to 7bd8441 Compare September 11, 2015 17:21
@@ -25,7 +25,7 @@ datepicker.regional.ko = {
dayNamesShort: [ "일","월","화","수","목","금","토" ],
dayNamesMin: [ "일","월","화","수","목","금","토" ],
weekHeader: "주",
dateFormat: "yy-mm-dd",
dateFormat: "yy. mm. dd.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The month and day should be single digit when possible. I'm not sure which form of the year we would use here. @rxaviers, do we display the medium or short date from CLDR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @scottgonzalez,

Datepicker rewrite using Globalize 1.x uses {date: 'short'} https://github.com/jquery/jquery-ui/blob/datepicker-globalize-1.x/ui/calendar.js#L42.

For comparison:

Globalize('en').formatDate(new Date(), {date: 'short'})
// > '9/21/15'

Globalize('en').formatDate(new Date(), {date: 'medium'})
// > 'Sep 21, 2015'

Globalize('en').formatDate(new Date(), {date: 'long'})
// > 'September 21, 2015'

Globalize('en').formatDate(new Date(), {date: 'full'})
// > 'Monday, September 21, 2015'

Globalize('en').formatDate(new Date(), {skeleton: 'yMd'})
// > '9/21/2015'

Globalize('en').formatDate(new Date(2015,0,1), {skeleton: 'yMd'})
// > '1/1/2015'

Globalize('en').formatDate(new Date(2015,0,1), {skeleton: 'yMMdd'})
// > Should give you the above using padded months and days when the PR below is complete:
// https://github.com/jquery/globalize/pull/462

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note (from the wiki): "Compared to master, the default date format is different, is that intended? Master has 4 digit years, rewrite only 2"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants