B
Bob
want to take a date and return tomorrow's date..
How to convert $tomorrow back to YY-MM-DD format?
What is the inverse of Date_to_Days ?
... perl2.pl ---------------------------
use strict; use warnings; use Date::Calc qw
all);
my ($yr2, $mon2, $day2, $tomorrow); my ($year, $month, $day);
$yr2 = 2005; $mon2 = 3; $day2 = 20;
print (" date- year: $yr2 month: $mon2 day:$day2 \n");
$tomorrow = Date_to_Days($yr2,$mon2,$day2) + 1;
print ("tomorrow: $tomorrow \n");
($year,$month,$day) = Today([$tomorrow]);
print ("tommorow- year: $year month: $month day:$day \n");
------------------------------------------------------------------
output ------------------------------------
D:\edu\lrn\perl\date>perl date2.pl
date- year: 2005 month: 3 day:20
tomorrow: 732026
tommorow- year: 2005 month: 9 day:1
How to convert $tomorrow back to YY-MM-DD format?
What is the inverse of Date_to_Days ?
... perl2.pl ---------------------------
use strict; use warnings; use Date::Calc qw
my ($yr2, $mon2, $day2, $tomorrow); my ($year, $month, $day);
$yr2 = 2005; $mon2 = 3; $day2 = 20;
print (" date- year: $yr2 month: $mon2 day:$day2 \n");
$tomorrow = Date_to_Days($yr2,$mon2,$day2) + 1;
print ("tomorrow: $tomorrow \n");
($year,$month,$day) = Today([$tomorrow]);
print ("tommorow- year: $year month: $month day:$day \n");
------------------------------------------------------------------
output ------------------------------------
D:\edu\lrn\perl\date>perl date2.pl
date- year: 2005 month: 3 day:20
tomorrow: 732026
tommorow- year: 2005 month: 9 day:1