Skip to content

Instantly share code, notes, and snippets.

@ktiedt
Created March 3, 2012 20:52
Show Gist options
  • Save ktiedt/1968169 to your computer and use it in GitHub Desktop.
Save ktiedt/1968169 to your computer and use it in GitHub Desktop.
dojo.date.locale.format() bug
dojo.date.locale.format() bug
Line 115 of locale.js reads:
case 'K': // 0-11
However documentation for the K format option says it should be 1-12 which means Line 116 should read identical to Line 110 (or they could be combined)
Exmaple:
a = new Date("2012-03-14 12:00:00")
Wed Mar 14 2012 12:00:00 GMT-0500 (CDT)
dojo.date.locale.format(a, {selector: 'time', timePattern: "K:mm a"})
"0:00 PM" // should read "12:00: PM"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment