www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS |
X-Spam-Check-By: | sourceware.org |
To: | cygwin AT cygwin DOT com |
From: | Andrew Schulman <schulman DOT andrew AT epamail DOT epa DOT gov> |
Subject: | Re: Incorrect year in date function. |
Date: | Mon, 04 Jan 2010 14:14:50 -0500 |
Lines: | 20 |
Message-ID: | <tff4k5p2bn1vrrec81kfb2b2qhducl6op8@4ax.com> |
References: | <hhtcmj$j5r$1 AT ger DOT gmane DOT org> <f60fe001001041054i16dabea4m6053a2aca46b723 AT mail DOT gmail DOT com> |
Mime-Version: | 1.0 |
X-Archive: | encrypt |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
> On Mon, Jan 4, 2010 at 1:40 PM, Jacob Jacobson wrote: > > I am curious as to why this happened. > > > > I was at work yesterday and created a file. The name of the file > > is created using the Cygwin date function. > > > > REV=$(date +rev-%b-%d-%g) > > APPNAME="$1-$REV.img" > > %g (and the four-digit version %G) is the year according to the ISO > week-number calendar; each such year is always a whole number of weeks > (364 or 371 days), starting on a Monday and ending on a Sunday. > Specifically, the first week is always the one containing January 4th; > as such, today is 2010W1-1, the first day of the ISO year, and > yesterday was 2009W53-7, the last day of the previous ISO year. So > you got what you asked for, even if that wasn't what you actually > wanted. :) Ah yes, the ISO year! Another fool falls into its dastardly trap! AH HA HA HA -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |