use Date::Calc qw(Delta_Days); my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime; $year += 1900; $mon += 1; my $today; $today = sprintf("%04d.%02d.%02d.", $year, $mon, $mday);
2015.01.01.
use Date::Calc qw(Add_Delta_Days); # 30일 전 my ($dt_year, $dt_mon, $dt_mday) = Add_Delta_Days($year, $mon, $mday, -30);