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