GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DATETIME::EVENT::CHINESE (3)

.ds Aq ’

NAME

DateTime::Event::Chinese - DateTime Extension for Calculating Important Chinese Dates

CONTENTS

SYNOPSIS



  use DateTime::Event::Chinese qw(:all);
  my $new_moon = chinese_new_years();

  my $dt0  = DateTime->new(...);
  my $next_new_year = $new_year->next($dt0);
  my $prev_new_year = $new_year->previous($dt0);

  my $dt1  = DateTime->new(...);
  my $dt2  = DateTime->new(...);
  my $span = DateTime::Span->new(start => $dt1, end => $dt2);

  my $set  = $new_year->intersection($span);
  my $iter = $set->iterator();

  while (my $dt = $iter->next) {
    print $dt->datetime, "\n";
  }

  my $new_year = chinese_new_year_for_sui($dt);
  my $new_year = chinese_new_year_for_gregorian_year($dt);
  my $new_year = chinese_new_year_after($dt);
  my $new_year = chinese_new_year_before($dt);



DESCRIPTION

This modules implements the algorithm described in Calendrical Calculations to compute some important Chinese dates, such as date of new year and other holidays (Currently only new years can be calculated).

FUNCTIONS

CW$set = chinese_new_years();

Returns a DateTime::Set that generates Chinese new years.

    chinese_new_year_for_sui($dt)

Returns the DateTime object representing the Chinese New Year for the sui (the period between two winter solstices) of the given date.



  my $dt = chinese_new_year_for_sui($dt0);



    chinese_new_year_for_greogrian_year($dt)

Returns the DateTime object representing the Chinese New Year for the given gregorian year.



  my $dt = chinese_new_year_for_sui($dt0);



    chinese_new_year_after($dt)

Returns a DateTime object representing the next Chinese New Year relative to the given datetime argument.



  my $next_new_year = chinese_new_year_after($dt0);



This is the function that is internally used by new_year()->next().

    chinese_new_year_before($dt)

Returns a DateTime object representing the previous Chinese New Year relative to the given datetime argument.



  my $prev_new_year = chinese_new_year_beore($dt0);



This is the function that is internally used by new_year()->previous().

AUTHOR

Daisuke Maki <daisuke@endeworks.jp>

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html

REFERENCES



  [1] Edward M. Reingold, Nachum Dershowitz
      "Calendrical Calculations (Millenium Edition)", 2nd ed.
       Cambridge University Press, Cambridge, UK 2002



SEE ALSO

DateTime DateTime::Set DateTime::Astro DateTime::Event::SolarTerm
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DATETIME::EVENT::CHINESE (3) 2011-11-29

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.