Created
June 4, 2011 16:13
-
-
Save toritori0318/1008024 to your computer and use it in GitHub Desktop.
現在日付の実働日をチェック
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env perl | |
| use strict; | |
| use lib; | |
| use Time::Piece; | |
| use Calendar::Japanese::Business; | |
| my $c = Calendar::Japanese::Business->new; | |
| use Getopt::Long qw/GetOptions :config auto_help/; | |
| my $work_day; | |
| GetOptions( | |
| 'work_day|d=s' => \$work_day, | |
| ); | |
| exit -1 unless $work_day; | |
| my $current_workday = $c->get_workday_from_day(localtime->mday); | |
| if($work_day == $current_workday) { | |
| exit 0; | |
| } | |
| exit -1; | |
| __END__ | |
| =head1 SYNOPSIS | |
| check_workday.pl [options] | |
| Options: | |
| --help display help message | |
| --work_day(d) check work day | |
| =cut | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment