Skip to content

question about date's

6 messages · ronggui, Brian Ripley, Richard van Wingerden +1 more

#
[1] "ÐÇÆÚÎå" "ÐÇÆÚÁù" "ÐÇÆÚÈÕ" "ÐÇÆÚÒ»" "ÐÇÆÚ¶þ"
[1] "ÆßÔÂ" "ÆßÔÂ" "ÆßÔÂ" "ÆßÔÂ" "ÆßÔÂ"



======= 2005-12-12 20:17:38 ÄúÔÚÀ´ÐÅÖÐÐ´µÀ£º=======
= = = = = = = = = = = = = = = = = = = =
			


 

2005-12-12

------
Deparment of Sociology
Fudan University

My new mail addres is ronggui.huang at gmail.com
Blog:http://sociology.yculblog.com
#
On Mon, 12 Dec 2005, ronggui wrote:

            
He asked for week numbers.  That's nothing like as easy, as it is not
well-defined.  But
[1] "26" "26" "27" "27" "27"

is one possibility ("%W" is another).  This approach will do the other
requests just as easily.

  
    
#
this is what I was looking for!
many many thanks!

regards,
richard
On 12/12/05, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
#
Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:
%W seems to be what is known as "ISO dates" (week starts on Monday),
except that
[1] "00"

should be week 53, 2004 according to my printed calendar, and emacs
calendar-mode too.

  
    
#
On Mon, 12 Dec 2005, Peter Dalgaard wrote:

            
I _did_ say
The POSIX definition is

%U
     Replaced by the week number of the year as a decimal number [00,53].
     The first Sunday of January is the first day of week 1; days in the
     new year before this are in week 0.

%W
     Replaced by the week number of the year as a decimal number [00,53].
     The first Monday of January is the first day of week 1; days in the
     new year before this are in week 0.

so it is doing what it is documented to do.  I'd take POSIX as more 
definitive than Emacs ....
#
Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:
But not more definitive than the ISO standard, I hope. There are
probably more that 1e8 calendars printed each year according that one. 

The two routines are just not doing the same thing. Calendar-mode goes
by the ISO standard, strftime by POSIX definitions. Of course it all
depends on what the user actually wanted.