Article View: comp.bugs.sys5
Article #943Bugs in cftime
From: Amos Shapir
Date: Thu, 05 Jan 1989 12:57
Date: Thu, 05 Jan 1989 12:57
19 lines
1270 bytes
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)
Technical Details
Message-ID:
<399@taux02.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-lcc!ames!amdahl!nsc!taux01!taux02!amosShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-lcc!ames!amdahl!nsc!taux01!taux02!amos From: amos@taux02.UUCP (Amos Shapir) Newsgroups: comp.bugs.sys5 Subject: Bugs in cftime Message-ID: <399@taux02.UUCP> Date: 5 Jan 89 12:57:11 GMT Organization: National Semiconductor (IC) Ltd, Israel Lines: 19