in reply to Localized weekday names
In my version of strftime, negative month day is ok, so the fix is easy: just subtract the week day from the month day:
#!/usr/bin/perl use warnings; use strict; use feature qw{ say }; use POSIX qw( locale_h strftime ); setlocale( LC_TIME, 'fr_FR' ); my @date = localtime; $date[3] -= $date[6]; my @wd = map { $date[3]++; strftime '%A', @date } 0 .. 6; print "@wd\n";
Note that a single array element is written $date[6], without the at-sign.
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Localized weekday names
by Sec (Monk) on Nov 03, 2017 at 15:08 UTC |