{"id":1833,"date":"2021-10-22T22:36:11","date_gmt":"2021-10-23T02:36:11","guid":{"rendered":"https:\/\/www.a2life.info\/w\/?p=1833"},"modified":"2021-10-22T22:36:11","modified_gmt":"2021-10-23T02:36:11","slug":"week-number-confusion","status":"publish","type":"post","link":"https:\/\/www.a2life.info\/w\/?p=1833","title":{"rendered":"Week number confusion"},"content":{"rendered":"<p>Just encountered this problem when I was talking with my colleague.\u00a0 He thought this week was week 43 but it actually was 42 on my calendar.\u00a0 Turned out, there are two ways to look at week number.<\/p>\n<p>First one is to simply take January first as a start of week one.\u00a0 In case of 2021, January 1 is Friday.\u00a0 \u00a0depending of what you think as a first day of week, this year&#8217;s week 1 is only 2 days long or 3 days long, then Week 2 will start on either January 3rd(Sunday) or January 4th (Monday)<\/p>\n<p>Excel function =WeekNum()\u00a0 uses this approach.<\/p>\n<p>Then there is a week number definition by ISO 8601.\u00a0 According to ISO,\u00a0 Week 1 is the first week of the year that has more than 4 days in a week.\u00a0 Further more, first day of week will start on Monday.<\/p>\n<p>With this definition, January first of 2021 does not qualify as a\u00a0 week number 1.\u00a0 A week starts on January 4th(Monday) is week number 1.<\/p>\n<p>Excel also has function to calculate this as\u00a0 \u00a0=ISOWeekNum()<\/p>\n<p>When I first turn on week number display on Outlook,\u00a0 it showed the week number based on &#8216;January 1 as week 1&#8217; approach.\u00a0 \u00a0This is not correct on many occasion. It appears majority of business now uses ISO week number.\u00a0 \u00a0You can change the settings in Outlook calendar to correct this.<\/p>\n<p>In Outlook, go to File then select &#8216;Option&#8217; then select &#8216;Calendar&#8217;\u00a0 In Worktime\u00a0 section, change &#8216;First day of week&#8217; to &#8216;Monday&#8217; then First Week of Year from &#8216;Starts on Jan 1&#8217; to &#8216;First 4 day week&#8217;<\/p>\n<p>Trying to code ISO weeknumber in typescript turned out to be a fun project but that is another story..<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just encountered this problem when I was talking with my colleague.\u00a0 He thought this week was week 43 but it actually was 42 on my calendar.\u00a0 Turned out, there are two ways to look at week number. First one is to simply take January first as a start of week one.\u00a0 In case of 2021, January 1 is Friday.\u00a0 \u00a0depending of what you think as a first day of week, this year&#8217;s week 1 is only 2 days long or 3 days long, then Week 2 will start on either January 3rd(Sunday) or January 4th (Monday) Excel function =WeekNum()\u00a0 uses this approach. Then there is a week number definition by &hellip; <a href=\"https:\/\/www.a2life.info\/w\/?p=1833\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[67,66],"class_list":["post-1833","post","type-post","status-publish","format-standard","hentry","category-misc","tag-excel","tag-outlook"],"_links":{"self":[{"href":"https:\/\/www.a2life.info\/w\/index.php?rest_route=\/wp\/v2\/posts\/1833","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.a2life.info\/w\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.a2life.info\/w\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.a2life.info\/w\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.a2life.info\/w\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1833"}],"version-history":[{"count":1,"href":"https:\/\/www.a2life.info\/w\/index.php?rest_route=\/wp\/v2\/posts\/1833\/revisions"}],"predecessor-version":[{"id":1835,"href":"https:\/\/www.a2life.info\/w\/index.php?rest_route=\/wp\/v2\/posts\/1833\/revisions\/1835"}],"wp:attachment":[{"href":"https:\/\/www.a2life.info\/w\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1833"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.a2life.info\/w\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1833"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.a2life.info\/w\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1833"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}