passionvorti.blogg.se

Date pcalc
Date pcalc












date pcalc
  1. #Date pcalc how to
  2. #Date pcalc iso

$calendar = Date::Pcalendar->new(PROFILE]) Moreover, whenever a method of this class returns a date, it does so by returning a Date::Pcalc date object. However, and perhaps against your expectations at times, especially in conjunction with the method "cache_add()", only the year number from that object will be used, not the year object itself (the year object in question might be using the wrong profile!). If you substitute an expected year number by an anonymous array (this is the recommended way of writing date constants, for increased readability of your programs), it must contain three values, nevertheless (otherwise the use of an anonymous array would be pointless).ĭon't confuse year numbers and their substitutes (a date object or an array reference) with Date::Pcalendar::Year objects, which are a totally different thing!īut incidentally :-), you may also pass a Date::Pcalendar::Year object whenever a year number is expected. $object->method3( $year1, $date2, ) Īnd similarly if a time or a combined date and time are expected. So instead of calling a given method like this: See Date::Pcalc::Object(3) for more details. Note that whenever a year number, a date, a time or a combined date and time are expected as input parameters by one of the methods of this class, you can always pass a Date::Pcalc date object or an array reference (of an array of appropriate length) instead! $flag = $calendar->is_work(YEAR,MONTH,DAY|DATE) INTERFACE $flag = $calendar->is_half(YEAR,MONTH,DAY|DATE)

date pcalc

$flag = $calendar->is_full(YEAR,MONTH,DAY|DATE) $date = $calendar->add_delta_workdays(YEAR,MONTH,DAY|DATE

date pcalc

($date,$rest) = $calendar->add_delta_workdays(YEAR,MONTH,DAY|DATE $days = $calendar->delta_workdays(YEAR1,MONTH1,DAY1|DATE1 $hashref = $calendar->tags(YEAR,MONTH,DAY|DATE) $year_2001_DE_SN = $calendar_DE_SN->year( 2001 = $calendar->cache_keys() # returns list of year = $calendar->cache_vals() # returns list of year objects $calendar_US_AZ = Date::Pcalendar->new( $Profiles-> ] )

#Date pcalc how to

If nevertheless you can't figure out how to solve a particular problem, please let me know! (See e-mail address at the bottom of this document.Use Date::Pcalendar::Profiles qw( $Profiles ) Some (mainly protestant) countries continued to use the Julian calendar (used until then) until as late as the beginning of the 20th century.įinally, note that this package is not intended to do everything you could ever imagine automagically for you it is rather intended to serve as a toolbox (in the best of UNIX spirit and traditions) which should, however, always get you where you want to go. even though the Gregorian calendar was only adopted in 1582 by most (not all) European countries, in obedience to the corresponding decree of catholic pope Gregor I in that year. Note that this package EXTRAPOLATES the Gregorian calendar BACK until the year 1 A.D. The module of course handles year numbers of 2000 and above correctly ("Year 2000" or "Y2K" compliance) - actually all year numbers from 1 to the largest positive integer representable on your system (which is at least 32767) can be dealt with. This module is a direct translation of Steffen Beyer's excellent Date::Calc module to Perl. (See also for a scan of part of the "DIN 1355" document (in German)).

#Date pcalc iso

Gregorian calendar date calculations Version: 6.1ĭate::Pcalc is a Perl module for all kinds of date calculations based on the Gregorian calendar (the one used in all western countries today), thereby complying with all relevant norms and standards: ISO/R 2015-1971, DIN 1355 and, to some extent, ISO 8601 (where applicable).














Date pcalc