{"id":12683,"date":"2015-10-27T14:36:53","date_gmt":"2015-10-27T18:36:53","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=12683"},"modified":"2018-12-27T12:31:23","modified_gmt":"2018-12-27T17:31:23","slug":"unicode-date-formats-yyyy","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2015\/10\/27\/unicode-date-formats-yyyy\/","title":{"rendered":"Unicode Date Formats, YYYY?!"},"content":{"rendered":"<p><a href=\"http:\/\/boredzo.org\/blog\/archives\/2015-10-24\/the-international-standards-organization-hates-your-guts\">Peter Hosey<\/a> (<a href=\"https:\/\/news.ycombinator.com\/item?id=10444969\">comments<\/a>):<\/p>\n<blockquote cite=\"http:\/\/boredzo.org\/blog\/archives\/2015-10-24\/the-international-standards-organization-hates-your-guts\"><p>YYYY and yyyy are <a href=\"http:\/\/www.unicode.org\/reports\/tr35\/tr35-31\/tr35-dates.html#Date_Format_Patterns\">Unicode date format patterns<\/a>. These offer quite a bit more flexibility than the old str[fp]time(3) formats, particularly in choosing different representations of the same value (e.g., &ldquo;September&rdquo; vs &ldquo;Sep&rdquo; vs &ldquo;09&rdquo; vs &ldquo;9&rdquo;).<\/p>\n<ul>\n<li>YYYY is defined as the &ldquo;year for week-of-year&rdquo;: that is, the year for ISO week dates.<\/li>\n<li>yyyy is defined as the calendar year.<\/li>\n<\/ul>\n<\/blockquote>\n<p>You probably want the latter.<\/p>\n<p id=\"unicode-date-formats-yyyy-update-2018-12-27\">Update (2018-12-27): See also: <a href=\"https:\/\/twitter.com\/davedelong\/status\/1068235202193842176\">Dave DeLong<\/a> and <a href=\"https:\/\/ericasadun.com\/2018\/12\/25\/iso-8601-yyyy-yyyy-and-why-your-year-may-be-wrong\/\">Erica Sadun<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Peter Hosey (comments): YYYY and yyyy are Unicode date format patterns. These offer quite a bit more flexibility than the old str[fp]time(3) formats, particularly in choosing different representations of the same value (e.g., &ldquo;September&rdquo; vs &ldquo;Sep&rdquo; vs &ldquo;09&rdquo; vs &ldquo;9&rdquo;). YYYY is defined as the &ldquo;year for week-of-year&rdquo;: that is, the year for ISO week [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2018-12-27T17:31:25Z","apple_news_api_id":"df6f0146-6d7f-4019-a616-240ed68876de","apple_news_api_modified_at":"2018-12-27T17:31:26Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/A328BRm1_QBmmFiQO1oh23g","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[131,69,31,30,71,258],"class_list":["post-12683","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-bug","tag-cocoa","tag-ios","tag-mac","tag-programming","tag-unicode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/12683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=12683"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/12683\/revisions"}],"predecessor-version":[{"id":23760,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/12683\/revisions\/23760"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=12683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=12683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=12683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}