Mercurial > mercurial > hgweb_golang.cgi
comparison src/kaigo/Porori/src2/porori.pl @ 41:34a474fb83c3
add perori/porori/nk.
author | pyon@macmini |
---|---|
date | Wed, 04 Mar 2020 23:46:59 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
40:c6df3bae683e | 41:34a474fb83c3 |
---|---|
1 use Time::Piece; | |
2 use Time::Seconds; | |
3 | |
4 my $today = localtime->ymd; | |
5 $today =~ s/-//g; | |
6 | |
7 print join ',' => "被保番", "氏名", "申請日", "区分", "開始日", "終了日", "期間", "\n"; | |
8 while (<>) { | |
9 chomp; | |
10 my ($h, $n, $s, $kbn, $d, $bgn, $end) = split /,/; | |
11 next if $d ne $today; | |
12 $kbn = "新規" if $kbn eq '01'; | |
13 $kbn = "更新" if $kbn eq '02'; | |
14 $kbn = "支介" if $kbn eq '10'; | |
15 $kbn = "区変" if $kbn eq '05'; | |
16 my $tbgn = Time::Piece->strptime($bgn, "%Y%m%d"); | |
17 my $tend = Time::Piece->strptime($end, "%Y%m%d"); | |
18 my $diff = $tend - $tbgn; | |
19 print join ',' => $h, $n, $s, $kbn, $bgn, $end, int $diff->months(); | |
20 print "\n"; | |
21 } | |
22 |