Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Possible bug?
- X-seq: zsh-workers 9178
- From: Zefram <zefram@xxxxxxxx>
- To: Mike Perez <mike@xxxxxx>
- Subject: Re: Possible bug?
- Date: Sun, 2 Jan 2000 00:55:09 +0000 (GMT)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <20000101030505.A1857@xxxxxxxxxxxxxxxxxxxxx> from Mike Perez at "Jan 1, 2000 03:05:05 am"
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Mike Perez wrote:
>Well I am not sure if this is a bug or not, but I was able to reproduce
>it on a few machines that all were in Y2K.
I can reproduce it too:
% date
Sun Jan 2 00:48:08 GMT 2000
% print -P '%D{%G}'
1999
% date +%G
1999
% date +%Y
2000
% print -P '%D{%Y}'
2000
What is %G, anyway? It's not one of the zsh extensions; it's just being
handled by the native strftime(3). My strftime(3) doesn't document %G,
and I don't have its source handy. I expect that %G is the year part
of the week specification for the current week; today is 1999-W52-7,
and 2000-W01 starts tomorrow (2000-01-03 == 2000-W01-1). Ah, look:
% date -d tomorrow
Mon Jan 3 00:52:44 GMT 2000
% date -d tomorrow +%G
2000
-zefram
Messages sorted by:
Reverse Date,
Date,
Thread,
Author