lots of questions about strftime()

Zev Sero zvs at bby.oz.au
Thu Aug 16 12:59:10 AEST 1990


In article <496 at mtndew.Tustin.CA.US> friedl at mtndew.Tustin.CA.US (Steve Friedl) writes:


	   %U - the week number of the year (with the first Sunday
		being the start of week 1) as a decimal number (00-53)
The Sunday after 1st January is the beginning of week 01.  This makes
a difference when the year begins on a Sunday.
	   %W - the week number of the year (with the first Monday
		being the start of week 1) as a decimal number (00-53)
Ditto.


	   U_weekno = (yday + (7 - (7000 + yday - wday) % 7)) / 7;
	   W_weekno = (yday + (7 - (7001 + yday - wday) % 7)) / 7;

U_weekno = (6 + yday - wday) / 7;
W_weekno = (6 + yday - (wday ? wday - 1 : 6)) / 7;
--
				Zev Sero  -  zvs at bby.oz.au
Violence is not a pleasant thing. It has caused much suffering in the world
since its invention, and many are convinced that it is Quite A Bad Thing.
					- Steven Megachiropter Foster



More information about the Comp.std.c mailing list