MattWoberts
Programmer
Hi,
I have a date stored in a C++ tm structure, and I need to work out what the week number is. Weeks always start on a Sunday, so if for example the date 1-jan-2002 was on a tuesday, then week 1 starts on the preceeding Sunday (30-Dec-2001), thus 1-jan-2002 is in week 1, but the 6-jan-2002 is in week 2 etc.
Does anyone know of a good way to calculate the week number automatically?
Many thanks
Matt Roberts
I have a date stored in a C++ tm structure, and I need to work out what the week number is. Weeks always start on a Sunday, so if for example the date 1-jan-2002 was on a tuesday, then week 1 starts on the preceeding Sunday (30-Dec-2001), thus 1-jan-2002 is in week 1, but the 6-jan-2002 is in week 2 etc.
Does anyone know of a good way to calculate the week number automatically?
Many thanks
Matt Roberts