{"id":1177,"date":"2020-02-06T12:17:44","date_gmt":"2020-02-06T12:17:44","guid":{"rendered":"https:\/\/sdf-docs.mansystems.com\/docs\/acr-rules\/reliability\/hourformat\/"},"modified":"2020-03-20T08:44:58","modified_gmt":"2020-03-20T08:44:58","slug":"hourformat","status":"publish","type":"docs","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/reliability\/hourformat","title":{"rendered":"Hour format should be specified correctly in parse\/format date-time functions"},"content":{"rendered":"\n<p>Released in version 1.5 (14 February 2020)<\/p>\n\n\n\n<p>This is likely a bug and should be fixed.<br>&#8220;H&#8221; is in the range 0-23; &#8220;h&#8221; is in the range 1-12, as expected. On the other hand, &#8220;K&#8221; is in the range 0-11 but &#8220;k&#8221; is in the range &#8220;1-24&#8221;, which is non-standard and should be avoided.<\/p>\n\n\n\n<p>&#8220;h&#8221; is usually used singly (rather than requiring exactly two digits), and always in conjunction with an AM\/PM specifier \u2013 as otherwise, it\u2019s ambiguous. &#8220;H&#8221; is usually used as &#8220;HH&#8221;, so that 5am is represented as \u201c05\u201d for example.<\/p>\n\n\n\n<p><strong>Noncompliant example:<\/strong><\/p>\n\n\n\n<p> <code>parseDateTime('13:37', 'hh:mm')<\/code><\/p>\n\n\n\n<p><strong>Compliant example:<\/strong><\/p>\n\n\n\n<p><code>parseDateTime('13:37', 'HH:mm')<\/code><\/p>\n","protected":false},"featured_media":0,"parent":97,"menu_order":12,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-1177","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/1177"}],"collection":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1177"}],"version-history":[{"count":4,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/1177\/revisions"}],"predecessor-version":[{"id":1205,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/1177\/revisions\/1205"}],"up":[{"embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/97"}],"next":[{"title":"Identical expressions should not be used on both sides of a binary operator","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/reliability\/identicalexpressionsbinary","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/694"}],"prev":[{"title":"Function arguments should be different","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/reliability\/identicalfunctionarguments","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/839"}],"wp:attachment":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1177"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=1177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}