Skip to content

Instantly share code, notes, and snippets.

@willwillis
Created December 13, 2009 21:11
Show Gist options
  • Save willwillis/255601 to your computer and use it in GitHub Desktop.
Save willwillis/255601 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use Date::Calc qw/:all/;
#
# posting some more scripts
# from back in the day
#
#
my %days_till = (
Graduation => Delta_Days( Today(), 2007, 12, 16 ),
MyLastFinal => Delta_Days( Today(), 2007, 12, 8 ),
Christmas => Delta_Days( Today(), 2007, 12, 25 ),
ThanksGiving => Delta_Days( Today(), 2007, 11, 22 ),
MyVacation => Delta_Days( Today(), 2007, 12, 10 ),
);
print "\nDays till...\n";
map { printf( "\n%20s:%3d", $_, $days_till{$_} ) }
sort { $days_till{$a} <=> $days_till{$b} } keys %days_till;
print "\n\n";
__END__
Days till...
ThanksGiving:-752
MyLastFinal:-736
MyVacation:-734
Graduation:-728
Christmas:-719
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment