[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Human date representation and strftime

From: Nuutti Kotivuori <naked_at_iki.fi>
Date: 2002-06-01 18:38:02 CEST

There is another choice to be made. And that is whether to use
apr_strftime or not.

The problem here is that the windows version of apr_strftime is
currently pretty much limited by what strftime can do on windows.

,----[ Windows strftime documentation ]
| %a Abbreviated weekday name
| %A Full weekday name
| %b Abbreviated month name
| %B Full month name
| %c Date and time representation appropriate for locale
| %d Day of month as decimal number (01 - 31)
| %H Hour in 24-hour format (00 - 23)
| %I Hour in 12-hour format (01 - 12)
| %j Day of year as decimal number (001 - 366)
| %m Month as decimal number (01 - 12)
| %M Minute as decimal number (00 - 59)
| %p Current locale's A.M./P.M. indicator for 12-hour clock
| %S Second as decimal number (00 - 59)
| %U Week of year as decimal number, with Sunday as first day of
| week (00 - 53)
| %w Weekday as decimal number (0 - 6; Sunday is 0)
| %W Week of year as decimal number, with Monday as first day of
| week (00 - 53)
| %x Date representation for current locale
| %X Time representation for current locale
| %y Year without century, as decimal number (00 - 99)
| %Y Year with century, as decimal number
| %z
| %Z Time-zone name or abbreviation; no characters if time zone is
| unknown
| %% Percent sign
`----

In addition, apr_strftime implements a few more.

,----[ apr_strftime extensions for Windows ]
| %C The century number (year/100) as a 2-digit integer. (SU)
| %D Equivalent to %m/%d/%y.(Yecch - for Americans only. Americans
| should note that in other countries %d/%m/%y is rather
| common. This means that in international context this format is
| ambiguous and should not be used.) (SU)
| %r The time in a.m. or p.m. notation. In the POSIX locale this is
| equivalent to '%I:%M:%S %p'. (SU)
| %T The time in 24-hour notation (%H:%M:%S). (SU)
| %e Like %d, the day of the month as a decimal number, but a
| leading zero is replaced by a space. (SU)
`----

There's a few restrictions this poses us. The first and foremost
of them is that "%Z" is the only time-zone indicator we have -
and that is text, not a number. I remember many of you being -
like me - against timezone names, as they are ambiguous.

So, either we decide to use the apr_strftime and limit ourselves
to this thing - or we dump that and just use the fields from
apr_time_exp_t. I'd favor the latter.

-- Naked

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jun 1 18:39:45 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.