How can we determine the surveillance week from a Date? I'm trying to write a function to write an entry file that automatically determines the week from the Date. In R, you can extract a week from a Date using format(date, "%U") but this doesn't seem to coincide with the Flu Challenge Guidelines which have 2016-11-07 using week 43 data, but format(date, "%U") gives week 45. If it was 44, that would be understandable as the current week uses the past week's data. But why is it two weeks off?
How can we determine the surveillance week from a Date? I'm trying to write a function to write an entry file that automatically determines the week from the Date. In R, you can extract a week from a Date using
format(date, "%U")but this doesn't seem to coincide with the Flu Challenge Guidelines which have 2016-11-07 using week 43 data, butformat(date, "%U")gives week 45. If it was 44, that would be understandable as the current week uses the past week's data. But why is it two weeks off?