From owner-freebsd-current Mon Sep 29 15:09:59 1997 Return-Path: <owner-freebsd-current> Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id PAA13876 for current-outgoing; Mon, 29 Sep 1997 15:09:59 -0700 (PDT) Received: from rvc1.informatik.ba-stuttgart.de (isdn022.stuttgart.netsurf.de [194.195.220.213]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id PAA13871 for <current@FreeBSD.ORG>; Mon, 29 Sep 1997 15:09:54 -0700 (PDT) Received: (from helbig@localhost) by rvc1.informatik.ba-stuttgart.de (8.8.7/8.8.5) id XAA05359; Mon, 29 Sep 1997 23:47:33 +0200 (MET DST) From: Wolfgang Helbig <helbig@Informatik.BA-Stuttgart.DE> Message-Id: <199709292147.XAA05359@rvc1.informatik.ba-stuttgart.de> Subject: Re: Adding algorithms [Was: cvs commit: src/usr.bin/cksum crc32.c ...] In-Reply-To: <199709281357.JAA08605@khavrinen.lcs.mit.edu> from Garrett Wollman at "Sep 28, 97 09:57:42 am" To: wollman@khavrinen.lcs.mit.edu (Garrett Wollman) Date: Mon, 29 Sep 1997 23:47:32 +0200 (MET DST) Cc: helbig@Informatik.BA-Stuttgart.DE, current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL30 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk [...] > > o Computes the Number of Week from a given date. > > According to DIN 1355 : The first week of year y is the first week > > that includes at least four days in year y. A week starts with > > Monday. I don't know about international standards so it might be > > useful for Germany only. > > ISO 8601. The strftime(3) function already provides this > functionality, although there is unfortunately no direct > iso8601weeknumber() function to give you the integer value directly. Unfortunately strftime(3)'s notion of week number only comes close to DIN 1355: According to ISO 9899: "%W" is replaced by the week number of the year (the first Monday as the first day of week 1) That's quite different from DIN 1355 and thus renders strftime's week numbers useless in Germany (and probably in other countries that adopted the ISO 8601 standard as well). BTW. the wording in ISO 9899 is a little less ambiguous and more consistent for "%W" and "%U". I guess I'll change the man page. Wolfgang