{"id":1174,"date":"2020-02-06T09:19:27","date_gmt":"2020-02-06T09:19:27","guid":{"rendered":"https:\/\/sdf-docs.mansystems.com\/docs\/acr-rules\/reliability\/day-of-year-should-not-be-used-in-parse-format-date-time-functions\/"},"modified":"2020-03-20T08:44:58","modified_gmt":"2020-03-20T08:44:58","slug":"dayofyear","status":"publish","type":"docs","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/reliability\/dayofyear","title":{"rendered":"Day of year should not be used 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 changed. <br> According to the java documentation for date formating and parsing   <a href=\"https:\/\/docs.oracle.com\/javase\/8\/docs\/api\/java\/text\/SimpleDateFormat.html\">https:\/\/docs.oracle.com\/javase\/8\/docs\/api\/java\/text\/SimpleDateFormat.html<\/a>:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p> Lowercase &#8220;dd&#8221; stands for day of month, but uppercase &#8220;DD&#8221; stands for day of the year. <\/p><\/blockquote>\n\n\n\n<p>Although there are valid use-cases for the latter the lowercase version is used much more often. <\/p>\n\n\n\n<p><strong>Noncompliant example:<\/strong><\/p>\n\n\n\n<p><code>parseDateTime('2015-05-21', 'yyyy-MM-DD')<\/code><\/p>\n\n\n\n<p><strong>Compliant example:<\/strong><\/p>\n\n\n\n<p><code>parseDateTime('2015-05-21', 'yyyy-MM-dd')<\/code><\/p>\n","protected":false},"featured_media":0,"parent":97,"menu_order":4,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-1174","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/1174"}],"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=1174"}],"version-history":[{"count":3,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/1174\/revisions"}],"predecessor-version":[{"id":1203,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/1174\/revisions\/1203"}],"up":[{"embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/97"}],"next":[{"title":"Delete behaviour should have error message if blue","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/reliability\/associationerrormessage","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/567"}],"prev":[{"title":"Conditions should always include at least one variable","link":"https:\/\/sdf-docs.clevr.com\/?docs=acr-rules\/reliability\/predictableconditionexpression","href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=\/wp\/v2\/docs\/1435"}],"wp:attachment":[{"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1174"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/sdf-docs.clevr.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=1174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}