in reply to help in billing process
#!/usr/local/bin/perl @months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); @weekDays = qw(Sun Mon Tue Wed Thu Fri Sat Sun); ($second, $minute, $hour, $dayOfMonth, $month, $yearOffset, $dayOfWeek +, $dayOfYear, $daylightSavings) = localtime(); $year = 1900 + $yearOffset; $theTime = "$hour:$minute:$second, $weekDays[$dayOfWeek] $months[$mont +h] $dayOfMonth, $year"; print $theTime; use Date::Calc qw(Delta_Days); my @abbr = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); $today[0] += 1900; for (my $i=$month; $i<=12; $i++) { $today[1]++; if($dayOfMonth==1) { my $days = Delta_Days($dayOfMonth, 7); print "these many days $days are used for billing $days \n +"; exit 0; } }
i hope this code is fine
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: help in billing process
by marto (Cardinal) on Jan 24, 2014 at 11:02 UTC |