User Tools

Site Tools


finding_20the_20iso_20week_20number

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
finding_20the_20iso_20week_20number [2018/03/31 13:19] – external edit 127.0.0.1finding_20the_20iso_20week_20number [2024/01/05 00:22] (current) – external edit 127.0.0.1
Line 1: Line 1:
 =====Finding the ISO week number===== =====Finding the ISO week number=====
  
-//by Richard Russell, November 2015//\\ \\  The code listed below finds the [[https://en.wikipedia.org/wiki/ISO_week_date|ISO week number]] (or year and week) corresponding to a given date:\\ \\ +//by Richard Russell, November 2015//\\ \\  The code listed below finds the [[https://en.wikipedia.org/wiki/ISO_week_date|ISO week number]] (or year and week) corresponding to a given date: 
 + 
 +<code bb4w>
         INSTALL @lib$+"DATELIB"         INSTALL @lib$+"DATELIB"
  
Line 41: Line 43:
         IF dow% = 0 dow% = 7         IF dow% = 0 dow% = 7
         = mjd% - dow% + 1         = mjd% - dow% + 1
-\\  If you want to know the ISO year as well as the week, you can return it in an additional parameter:\\ \\ +</code> 
 + 
 +If you want to know the ISO year as well as the week, you can return it in an additional parameter: 
 + 
 +<code bb4w>
         DEF FN_ISOweek(day%,month%,year%,RETURN iyr%)         DEF FN_ISOweek(day%,month%,year%,RETURN iyr%)
         LOCAL mjd%         LOCAL mjd%
         ... remainder as above         ... remainder as above
 +</code>
finding_20the_20iso_20week_20number.1522502360.txt.gz · Last modified: 2024/01/05 00:17 (external edit)