Date-Qreki
    
    
  
  
  
view release on metacpan or search on metacpan
4. Help - what to do if you get stuck
-----------------------------------------------------------------------------
1. ABOUT
Date::Qreki - convert Gregorian to Japanese "kyureki" dates.
This module contains functions related to the old Japanese lunar
calendar.  Convert Western dates to old Japanese lunar calendar dates
with "calc_kyureki". Get the fortune-telling day with
"get_rokuyou" or "rokuyou_unicode". Check if a date is a solar
term with "check_24sekki".
-----------------------------------------------------------------------------
2. DOCUMENTATION
You can read the documentation for the module online at the following
websites:
examples/synopsis.pl view on Meta::CPAN
#!/home/ben/software/install/bin/perl
use warnings;
use strict;
use utf8;
use Date::Qreki ':all';
my @qreki = calc_kyureki (2017, 1, 31);
print "Old calendar $qreki[0] $qreki[2] $qreki[3]\n";
lib/Date/Qreki-ja.pod view on Meta::CPAN
=head1 åå
Date::Qreki - æ°æ§æ¦å¤æ
=head1 æ¸å¼
    
    use utf8;
    use Date::Qreki ':all';
    my @qreki = calc_kyureki (2017, 1, 31);
    print "Old calendar $qreki[0] $qreki[2] $qreki[3]\n";
    
ã¯ããããåºåãä½ãï¼
    Old calendar 2017 1 4
(ãã®ä¾ã¯L<F<synopsis.pl>|https://api.metacpan.org/source/BKB/Date-Qreki-0.07/examples/synopsis.pl>ã¨ãã¦ãã£ã¹ããã«ããã)
=head1 ãã¼ã·ã§ã³
å½èª¬æã¯Date::Qrekiã®0.07ãã¼ã·ã§ã³ã«å¿ãããå½ãã¼ã·ã§ã³ã¯gitã®Tue Jan 31 12:11:14 2017 +0900ã®L<c07982b5dc1b3e61c395505faa297f717276a4e3|https://github.com/benkasminbullock/Date-Qreki/commit/c07982b5dc1b3e61c395505faa297f717...
=head1 解説
lib/Date/Qreki.pod view on Meta::CPAN
Date::Qreki - convert Gregorian to Japanese "kyureki" dates.
=head1 VERSION
This documents Date::Qreki version 0.07
corresponding to git commit L<c07982b5dc1b3e61c395505faa297f717276a4e3|https://github.com/benkasminbullock/Date-Qreki/commit/c07982b5dc1b3e61c395505faa297f717276a4e3> released on Tue Jan 31 12:11:14 2017 +0900.
=head1 DESCRIPTION
This module contains functions related to the old Japanese lunar
calendar.  Convert Western dates to old Japanese lunar calendar dates
with L</calc_kyureki>. Get the fortune-telling day with
L</get_rokuyou> or L</rokuyou_unicode>. Check if a date is a solar
term with L</check_24sekki>.
=head1 FUNCTIONS
=head2 calc_kyureki
	@kyureki = calc_kyureki ($year, $mon, $day);
Given a western date, return the corresponding old Japanese calendar
date. The return value is an array containing the following fields.
=over
=item kyureki[0] - the corresponding year
=item kyureki[1] - if the month is a leap month (intercalary month)
See L<the Wikipedia article on
Intercalation|https://en.wikipedia.org/wiki/Intercalation_(timekeeping)>
lib/Date/Qreki.pod view on Meta::CPAN
corresponding to kanji names 0:å¤§å® 1:èµ¤å£ 2:å
å 3:åå¼ 4:å
è²  5:仿»
.
See also L</rokuyou_unicode> for a version which returns the kanji
names of the days.
=head2 rokuyou_unicode
    my $rokuyou = rokuyou_unicode (2017, 1, 30);
This returns the kanji form of the rokuyou, which are six Japanese
fortune telling days. The three arguments are year, month, and day in
the modern calendar. This just calls L</get_rokuyou> with the dates
then returns a Unicode version of the date. See, for example,
L<WWWJDIC|http://www.edrdg.org/cgi-bin/wwwjdic/wwwjdic?1C> for the
meanings of each of these day names.
This function was added in version 0.07 of the module.
=head2 check_24sekki
    my $sekki = check_24sekki ($year, $month, $day);
t/Date-Qreki.t view on Meta::CPAN
binmode $builder->failure_output, ":utf8";
binmode $builder->todo_output,    ":utf8";
binmode STDOUT, ":encoding(utf8)";
binmode STDERR, ":encoding(utf8)";
BEGIN { use_ok('Date::Qreki') };
use Date::Qreki ':all';
check ([1966, 3, 16], [1966, 0, 2, 25], 3);
check ([1996, 10, 17], [1996, 0, 9, 6], 3);
check ([996, 1, 17], [995, 0, 12, 19], 1);
# Date of changeover to Gregorian calendar in Japan.
# According to http://ja.wikipedia.org/wiki/%E6%97%A7%E6%9A%A6.
check ([1873, 1, 1], [1872, 0, 12, 3], 3);
my $rokuyou = rokuyou_unicode (2017, 1, 31);
is ($rokuyou, '仿»
');
# http://eco.mtk.nao.ac.jp/koyomi/yoko/2017/rekiyou172.html
my $sekki1 = check_24sekki (2017,1,05);
is ($sekki1, 'å°å¯');
my $sekki2 = check_24sekki (2017,1,06);
is ($sekki2, '');
( run in 0.525 second using v1.01-cache-2.11-cpan-5dc5da66d9d )