Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
use POSIX qw(mktime); # required for mktime function
# $mon is the month number (0-11)
# $ynum is year - 1900 (for 2004 enter 104)
$mday=1; # 1st
$mon=7; # August
$ynum=104; # 2004
$tstamp = mktime (0,0,0,$mday,$mon,$ynum);
$projected_time = localtime ($tstamp);
$month_day=substr $projected_time,0,3;
++$mday if $month_day eq "Sun";
$mday+=2 if $month_day eq "Sat";
$month_day eq "Mon" if $mday > 1;
print "\nFirst business day is ",$month_day," and is on day ",$mday," of month";
sub check_holiday {
my %holidays;
my ($date)=@_;
open (FH, "<holidays.txt");
while (<FH>) {
chomp($_);
$holidays{$_}=1;
}
if (exists $holiday{$date}) {
return "Holiday";
} else {
return "Not a holiday";
}
}
if ( check_holiday ($date_2_check) ne "Holiday") {
#it's not a holiday