Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: Is there an easy way to get the start date of the current week?

by james2vegas (Chaplain)
on Aug 22, 2010 at 07:26 UTC ( [id://856562]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Is there an easy way to get the start date of the current week?
in thread Is there an easy way to get the start date of the current week?

The scalar value of localtime is explicitly not locale dependent. It is a fixed format, see ctime(3)
  • Comment on Re^3: Is there an easy way to get the start date of the current week?

Replies are listed 'Best First'.
Re^4: Is there an easy way to get the start date of the current week?
by Anonymous Monk on Aug 22, 2010 at 08:06 UTC
    perlfunc also mentions this
    This scalar value is not locale dependent but is a Perl builtin. ... To get somewhat similar but locale dependent date strings, set up your locale environment variables appropriately ... use POSIX qw(strftime);
      That's a curious way of phrasing it. It seems to suggest that anything that's a Perl builtin isn't locale dependent. But grepping through the perlfunc manual page does reveal builtins that have a locale dependency: lc, lcfirst, (s)printf, sort, uc, ucfirst. And then there are regular expressions.
Re^4: Is there an easy way to get the start date of the current week?
by Tux (Canon) on Aug 22, 2010 at 08:00 UTC

    I stand corrected.

    I however probably still wouldn't rely on it as there are probably way too many other functions that /do/ depend on the locale, or suddenly behave different if POSIX comes into play (or when it explicitely does not), or when modules happen to be in place that overrule this default.


    Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://856562]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-18 07:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found