root/misc/heisei

Revision 2072 (checked in by miyagawa, 13 years ago)

heisei

  • Property svn:executable set to *
Line 
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4
5 use DateTime;
6 use Date::Japanese::Era;
7 binmode STDOUT, ":utf8";
8
9 my $dt = @ARGV
10     ? DateTime->new(year => $ARGV[0], month => 1, day => 1)
11     : DateTime->now;
12
13 my $era = Date::Japanese::Era->new($dt->year, $dt->month, $dt->day);
14
15 print $era->name, $era->year, "\n";
Note: See TracBrowser for help on using the browser.