in reply to Re^4: 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?
use strict; use warnings; sub get_bofw { my $time = shift; my @t = localtime($time); my $bow = $time - ($t[6] * 86400); localtime($bow); } # Tue Mar 16 2010 12pm my $bofw = get_bofw(1268766000); print "$bofw\n";
use strict; use warnings; sub get_bofw { my $time = shift; my @t = localtime($time); my $bow = $time - ($t[6] * 86400); localtime($bow); } # Tue Mar 16 2010 12pm my $time = timelocal(0,0,12,21,4,74); my $bofw = get_bofw($time); print "$bofw\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Is there an easy way to get the start date of the current week?
by BrowserUk (Patriarch) on Aug 21, 2010 at 16:01 UTC | |
by james2vegas (Chaplain) on Aug 21, 2010 at 16:22 UTC |