in reply to Re^6: Parsing/regex question
in thread Parsing/regex question
my %tz_lkup = ( ny => "America/New_York", ln => "Europe/London", tk => "Asia/Tokyo", hk => "Asia/Hong_Kong", se => "Asia/Seoul", mo => "Europe/Moscow", ); my $today_dt = DateTime->now( time_zone => $tz_lkup{$region} ); my $tomorrow_dt = $today_dt->add( days => 1 ); my $yesterday_dt = $today_dt->subtract( days => 1 ); print "It is now $today_dt in ", uc($region), "\n"; ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Parsing/regex question
by vxp (Pilgrim) on Jul 08, 2009 at 19:04 UTC |