{"id":59,"date":"2009-11-07T09:44:05","date_gmt":"2009-11-07T09:44:05","guid":{"rendered":"http:\/\/blog.soton.ac.uk\/webteam\/?p=59"},"modified":"2009-11-07T09:44:05","modified_gmt":"2009-11-07T09:44:05","slug":"date-formats","status":"publish","type":"post","link":"https:\/\/blog.soton.ac.uk\/webteam\/2009\/11\/07\/date-formats\/","title":{"rendered":"Date Formats"},"content":{"rendered":"<p>Display dates in any way your users want. I don&#8217;t care.<\/p>\n<p>Edit dates in forms, the way that best suits your users, but make sure the format is clear.<\/p>\n<p>Under-the-hood however there are NO EXCUSES. Acceptable date formats are<\/p>\n<ul>\n<li>YYYY-MM-DD<\/li>\n<li>YYYY-MM-DD HH:MM:SS<\/li>\n<li>YYYY-MM-DDTHH:MM:SSZ (ISOtastic!)<\/li>\n<li>seconds since 1970 (UNIX time)<\/li>\n<\/ul>\n<p>At a push you could store timezones, but UTC is better.<\/p>\n<p>If you ever use MM\/DD\/YYYY in a machine-readable file we will send the data-format ninjas to destroy your entire civilisation. (I&#8217;m looking at you, U.S.A.)<\/p>\n<p>Actually if you&#8217;re writing a page for a global audience, make it clear. The best human format is with a month as 3 letters, so you can&#8217;t be confused about which bit is which. Some sodding sites have forced me to hunt through other pages to find a date where d&gt;12 just to figure out which way around they are.<\/p>\n<p>A good tip is also to put the day of the week in. In short term dates, people think in terms of next Wednesday, and if you don&#8217;t then they&#8217;ll be force to convert in their heads. Another benefit is that it catches typos as people see the resultant page and go &#8220;Hey, that says our meeting is on a Sunday&#8230;. oops did I say July? I meant June!&#8221;<\/p>\n<p>I like putting in little <sup>th<\/sup>s on my dates but our communication manager keeps making me take them out again. It&#8217;s not a big deal, but I&#8217;m going to use one right now to cheer myself up.<\/p>\n<p>Christopher Gutteridge, Saturday, 7<sup>th<\/sup> November, 2009.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Display dates in any way your users want. I don&#8217;t care. Edit dates in forms, the way that best suits your users, but make sure the format is clear. Under-the-hood however there are NO EXCUSES. Acceptable date formats are YYYY-MM-DD YYYY-MM-DD HH:MM:SS YYYY-MM-DDTHH:MM:SSZ (ISOtastic!) seconds since 1970 (UNIX time) At a push you could store [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-59","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/59","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/comments?post=59"}],"version-history":[{"count":3,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/59\/revisions"}],"predecessor-version":[{"id":62,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/59\/revisions\/62"}],"wp:attachment":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/media?parent=59"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/categories?post=59"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/tags?post=59"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}