{"id":3867,"date":"2020-09-16T20:00:43","date_gmt":"2020-09-16T18:00:43","guid":{"rendered":"https:\/\/eskerahn.dk\/?p=3867"},"modified":"2024-10-01T18:27:40","modified_gmt":"2024-10-01T16:27:40","slug":"calculate-day-of-week","status":"publish","type":"post","link":"https:\/\/eskerahn.dk\/?p=3867","title":{"rendered":"Calculate day of week"},"content":{"rendered":"<p>A small guide on calculating the day of week fairly easily<\/p>\n<p><a href=\"https:\/\/eskerahn.dk\/?p=3867\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3868\" src=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2020\/03\/day-of-week-to-discount1.png\" alt=\"\" width=\"600\" height=\"315\" srcset=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2020\/03\/day-of-week-to-discount1.png 600w, https:\/\/eskerahn.dk\/wp-content\/uploads\/2020\/03\/day-of-week-to-discount1-300x158.png 300w, https:\/\/eskerahn.dk\/wp-content\/uploads\/2020\/03\/day-of-week-to-discount1-150x79.png 150w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><!--more--><\/p>\n<p><span style=\"font-size: 8pt;\">(Image &#8216;borrowed&#8217; from <a href=\"https:\/\/insights.bookbub.com\/best-day-of-week-to-discount-ebook\/\">here<\/a><\/span><span style=\"font-size: 8pt;\">)<\/span><\/p>\n<p>Twelve dates are all we need to remember, (and one day of week each year), the rest is simple calculus that anyone can do without paper.<\/p>\n<p>1) Memorise twelve DATES that got the same weekday (four weeks apart), note the start in March<span style=\"color: #999999;\">, to avoid dealing with Feb 29.<\/span><\/p>\n<p style=\"padding-left: 40px;\">Mar. <strong>31<\/strong>.<br \/>\nApr. <strong>28<\/strong>.<br \/>\nMay <strong>26<\/strong>.<br \/>\nJun. <strong>23<\/strong>.<br \/>\nJul. <strong>21<\/strong>.<br \/>\nAug. <strong>18<\/strong>.<br \/>\nSep. <strong>15<\/strong>.<br \/>\nOct. <strong>13<\/strong>.<br \/>\nNov. <strong>10<\/strong>.<br \/>\nDec. <strong>8<\/strong>.<br \/>\nJan. <strong>5<\/strong>.<span style=\"color: #999999;\"> (*)<\/span><br \/>\nFeb. <strong>2<\/strong>. <span style=\"color: #999999;\">(*)<\/span><\/p>\n<p style=\"padding-left: 40px;\"><span style=\"color: #999999;\"> (*) the following year<\/span><\/p>\n<p>\u00a0\u00a0\u00a0 If you prefer a formula: <em><strong>Floor(39.3 &#8211; m\u00d72.6)<\/strong><\/em> &#8230; with <em>m<\/em> in 3 to 14.<\/p>\n<p>2) Each year memorise this day of week for current year. E.g. for 2021: Wednesday<span style=\"color: #999999;\">, and optionally the week-number for the first: 13 in 2021<\/span><\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Usage:<\/strong><\/span><\/p>\n<p>3) Remember that January and February are handled as previous year. Count the number of days relative to one of the reference days, While larger than 7 subtract 7 (or: take the remainder of this number by division with 7), and forward the day of week that number of days. (Obviously you can count both days before and after, stepping backwards\/forwards)<\/p>\n<p><strong>Example:<\/strong> <em>what is the weekday of new years eve?<br \/>\n<\/em><\/p>\n<p>Either count this as 5 days before Jan. <strong>5<\/strong>. And as 7-5=2, that is 2 days after the memorised day.<br \/>\nOr if you prefer counting forwards only\u00a0 start from Dec <strong>8. <\/strong>It is (31-<strong>8<\/strong>)=23 days after, but 23 <a href=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2020\/03\/Mod7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3879\" src=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2020\/03\/Mod7.png\" alt=\"\" width=\"11\" height=\"16\" \/><\/a> 2 (Or: 23-7-7-7=2), so 2 days after.<br \/>\nSo based on Wednesday for 2021, that is: Friday.<\/p>\n<p>&nbsp;<\/p>\n<p>Note that Mar. 2. in normal years and Mar. 1 in leap years obviously have the same weekday as Feb. 2 (as 28<a href=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2020\/03\/Mod7.png\"> <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3879\" src=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2020\/03\/Mod7.png\" alt=\"\" width=\"11\" height=\"16\" \/> <\/a>0). And as Mar. 3 obvious got the same weekday as Mar 31. (31-3=28<a href=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2020\/03\/Mod7.png\"> <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3879\" src=\"https:\/\/eskerahn.dk\/wp-content\/uploads\/2020\/03\/Mod7.png\" alt=\"\" width=\"11\" height=\"16\" \/> <\/a>0) the day of week of a particular day is advanced by one every normal year and by two in leap years <span style=\"color: #999999;\">as you most likely already knew<\/span>.<\/p>\n<p>If you want to calculate for a date somewhere further in the future, you thus need to add 1 per year PLUS an additional 1 per intermediate 29\/2 (leap year).<br \/>\nObviously subtract similar for a date in an earlier year.<\/p>\n<p>&nbsp;<\/p>\n<p>If you have trouble memorising the 12, but do remember the number of days per month, moving four weeks forward is moving one month ahead and days backwards 31-28=3 respectively 30-28=2 going from a month with 31 respectively 30 days to the next.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Week numbers<\/strong><\/p>\n<p>Note that the dates selected for memory are deliberately taken four weeks apart, this also makes it easier to calculate date distances and work with week-numbers.<\/p>\n<p>For obvious reasons Jan 4 is always week 1. So Mar 29 in normal years (Mar 28 in leap years) is thus always <strong>week 13<\/strong><br \/>\nSo looking at the weekday of March 31 (two or three days later):<\/p>\n<ul>\n<li>If Monday or Tuesday it is always week <strong>14<\/strong><span style=\"color: #808080;\"> (going back 2 or 3 days always goes to previous week)<\/span><\/li>\n<li>If Wednesday then week <strong>13<\/strong> normally and <strong>14<\/strong> in leap years<span style=\"color: #808080;\">\u00a0 (2 days back is same week, 3 days previous week)<\/span><\/li>\n<li>If Thursday to Sunday it is always week <strong>13 <\/strong><span style=\"color: #808080;\">(going back 2 or 3 days is always the same week)<\/span><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>List for some years <span style=\"text-decoration: underline;\">March 31<\/span>. of week-number and weekday<br \/>\n<\/strong><\/p>\n<p>2020: 13, Tuesday<br \/>\n2021: 13, Wednesday<br \/>\n2022: 13, Thursday<br \/>\n2023: 13, Friday<br \/>\n2024: 13, Sunday<br \/>\n2025: 14, Monday<br \/>\n2026: 14, Tuesday<br \/>\n2027: 13, Wednesday<br \/>\n2028: 13, Friday<br \/>\n2029: 13, Saturday<br \/>\n2030: 13, Sunday<br \/>\n2031: 14, Monday<br \/>\n2032: <strong>14<\/strong>, Wednesday<br \/>\n2033: 13, Thursday<br \/>\n2034: 13, Friday<br \/>\n2035: 13, Saturday<br \/>\n2036: 14, Monday<br \/>\n2037: 14, Tuesday<br \/>\n2038: 13, Wednesday<br \/>\n2039: 13, Thursday<br \/>\n2040: 13, Saturday<br \/>\n2041: 13, Sunday<br \/>\n2042: 14, Monday<br \/>\n2043: 14, Tuesday<br \/>\n2044: 13, Thursday<br \/>\n2045: 13, Friday<br \/>\n2046: 13, Saturday<br \/>\n2047: 13, Sunday<br \/>\n<span style=\"color: #808080;\">2048: 13, Tuesday<br \/>\n.<br \/>\n.<\/span><\/p>\n<p>(and 28 years pattern repeats itself)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A small guide on calculating the day of week fairly easily<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,1],"tags":[],"class_list":["post-3867","post","type-post","status-publish","format-standard","hentry","category-math","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/eskerahn.dk\/index.php?rest_route=\/wp\/v2\/posts\/3867","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eskerahn.dk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eskerahn.dk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eskerahn.dk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/eskerahn.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3867"}],"version-history":[{"count":13,"href":"https:\/\/eskerahn.dk\/index.php?rest_route=\/wp\/v2\/posts\/3867\/revisions"}],"predecessor-version":[{"id":6548,"href":"https:\/\/eskerahn.dk\/index.php?rest_route=\/wp\/v2\/posts\/3867\/revisions\/6548"}],"wp:attachment":[{"href":"https:\/\/eskerahn.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3867"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eskerahn.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3867"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eskerahn.dk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3867"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}