When specifying a date format for the jQuery UI datepicker YY is a 4 digit year and Y is a 2 digit year:
YY = 2011
Y = 11
See http://docs.jquery.com/UI/Datepicker/formatDate
Was curious why this is.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
All of the single character variations (d, m, y) are the short version. Double is long version. Since the short version of a year is two digits, using
yyspecifies the long version, which is four digits. The format is not directly related to the number of digits that the date outputs.Just as M (single) means: “Jan, Feb, Mar, Apr”, and MM (double) means: “January, February, March, April”. The same goes for all of the format chars.
This is unlike the standard format for PHP, which may confuse some.
The chosen format was to meet the web standards (RFC)s for date formatting.
See: RFC-822