* Philip Newton ([EMAIL PROTECTED]) [13 Aug 2000 04:10]:
> On Fri, 11 Aug 2000, Nathan Wiger wrote:
> > Philip Newton wrote:
> > > So if we're now on 1-indexing, we'll see lots of @months = (undef, 'Jan',
> > > 'Feb') or qw(dummy Jan Feb)... oh well.
> >
> > Far better, use the new builtin object methods:
> >
> > $d = date;
> > print "today is ", $d->date('%A'); # Friday
> This doesn't solve the problem for those who want 'F', or 'Fri', or
> even 'Freitag' or 'Vendredi'.
Well, Fri can be catered for using %a (as in strftime at present). Check
out 'man strftime':
%a The abbreviated weekday name according to the current locale.
%A The full weekday name according to the current locale.
%b The abbreviated month name according to the current locale.
%B The full month name according to the current locale.
%c The preferred date and time representation for the current locale.
Note the 'current locale' bit. That takes care of Freitag, Vendredi or
Kinyoobi (in UTF-16, natch).
As for F? Use substr.
cheers,
--
iain truskett, aka Koschei. <http://eh.org/~koschei/>
Strings selected at random are much more likely to be
syntactically correct Perl programs than they are to be C or Lisp
programs, and in fact have positive probability of being correct.
-- <http://www.plover.com/~mjd/perl/idiocy/RandProg.html>
- Re: RFC 48 (v2) Replace localtime() and g... Russ Allbery
- Re: RFC 48 (v2) Replace localtime() and gmtime() with ... Graham Barr
- Re: RFC 48 (v2) Replace localtime() and gmtime() ... Nathan Wiger
- Re: RFC 48 (v2) Replace localtime() and gmtim... Russ Allbery
- Re: RFC 48 (v2) Replace localtime() and g... Tim Jenness
- Re: RFC 48 (v2) Replace localtime() and gmtim... Jonathan Scott Duff
- Re: RFC 48 (v2) Replace localtime() and gmtime() with ... Philip Newton
- Re: RFC 48 (v2) Replace localtime() and gmtime() ... iain truskett
- Re: RFC 48 (v2) Replace localtime() and gmtime() ... Nathan Wiger
- Re: RFC 48 (v2) Replace localtime() and gmtim... Philip Newton
- Re: RFC 48 (v2) Replace localtime() and g... iain truskett
- Re: RFC 48 (v2) Replace localtime() and gmtim... Bryan C . Warnock
- Re: RFC 48 (v2) Replace localtime() and g... Nathan Wiger
- Re: RFC 48 (v2) Replace localtime() and gmtime() with ... Jonathan Leffler
- Re: RFC 48 (v2) Replace localtime() and gmtime() with ... Tim Jenness
- Re: RFC 48 (v2) Replace localtime() and gmtime() ... Nathan Wiger
- Re: RFC 48 (v2) Replace localtime() and gmtim... Tim Jenness
- Re: RFC 48 (v2) Replace localtime() and gmtim... Philip Newton
- Re: RFC 48 (v2) Replace localtime() and gmtime() with ... Bart Lateur
- Re: RFC 48 (v2) Replace localtime() and gmtime() ... Jonathan Scott Duff
- Re: RFC 48 (v2) Replace localtime() and gmtim... Kai Henningsen
