Re: week of year function
Posted in 1998
Jonathan Leffler — — source: Informix-list mailing list archive (1991-1998)
Dirk Gunsthoevel wrote: > Steffen Kuebler wrote: > > I'm searching for a date function which returns me the week of the year. > > If it can be done in C take a look at the strftime function. I don't have access to ISO 8601 at the moment, but there's an official definition of week numbers in that standard (which also defines 1998-01-26 as a date). The formula has weeks starting on Mondays, and week 1 depends on Thursday's and the 4th of January somehow, if my failing memory serves me correct. It also means that some dates at the beginning of January can be in week 53 of the previous year... I think. Yours, Jonathan Leffler (j.leffler@acm.org) #include <resuscitation.h>