LibreOffice Calc电子表格提供了一个函数ISOWEEKNUM
,用于返回指定日期的标准ISO 8601 week number。
我想要反其道而行之。
➠给定一个标准的周数,给我那个星期的第一天(星期一)的日期。
传递整数是可以接受的。如果能够以标准格式传递字符串也很好。
像这样:
DATE_OF_ISOWEEKNUM( 2017 , 42 ) ➝ date of Monday of week 42 in week-based year 2017
DATE_OF_ISOWEEKNUM( "2017-W42" ) ➝ date of Monday of week 42 in week-based year 2017
理想情况下,我可以在周一至周日通过1-7号来指定我想要约会的星期几。像这样:
DATE_OF_ISOWEEKNUM( 2017 , 42 , 1 ) ➝ date of Monday of week 42 in week-based year 2017
DATE_OF_ISOWEEKNUM( "2017-W42-1" ) ➝ date of Monday of week 42 in week-based year 2017
DATE_OF_ISOWEEKNUM( 2017 , 42 , 7 ) ➝ as above, but Sunday
DATE_OF_ISOWEEKNUM( "2017-W42-7" ) ➝ as above, but Sunday