🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Amos Shapir Thu, 05 Jan 1989 12:57
Bugs in cftime
#943
Author: Amos Shapir
Date: Thu, 05 Jan 1989 12:57
19 lines
1270 bytes
There are two bugs in the implementation of options %U and %W (week of
the year) in cftime and ascftime:

- In a year which starts on a Monday (wday=1), %U becomes 3 instead of 2
 on the 2nd week, thus ends up having 53 weeks, with a partial 54th week
 at the end.  The same thing happens to %W in a year which starts on a Tuesday.

- The initial partial week of the year (3 days or less, if a year starts
 on a Thursday for %U, Friday for %W) is always computed as week 52 of the
 previous year, even though by cftime's own reckoning it may be week 53.

(Note: these formats are a rather new addition, and might not exist on 
some systems.  On the other hand, later systems may have fixed these bugs
already.  Please do not flame me in either case).
-- 
	Amos Shapir				amos@nsc.com
National Semiconductor (Israel) P.O.B. 3007, Herzlia 46104, Israel
Tel. +972 52 522261  TWX: 33691, fax: +972-52-558322
34 48 E / 32 10 N			(My other cpu is a NS32532)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads