Date-Calc-XS

 view release on metacpan or  search on metacpan

CHANGES.txt  view on Meta::CPAN

    in "Date::Calc", "Date::Calc::Object" and "Date::Calendar::Year"
    and more test cases have been added
 +  Updated the documentation to reflect all changes
 +  Updated version numbers of dependencies in "t/f000.t"

Version 5.8   12.09.2009

 +  Added a new function "N_Delta_YMD()"
 +  Added a new test script "t/f037.t"
 +  Updated the "Calc.pod" manual page accordingly
 +  Renamed "calendar.cgi" in the "examples"
    subdirectory to "calendar.pl"
 +  Added a new CGI script named "datecalc.pl"
    to the "examples" subdirectory

Version 5.7   23.08.2009

 +  Fixed "october" => "oktober" in Dutch
 +  Disabled the special abbreviated names
    of the days of the week in Portuguese
 +  Made the days which form the weekend con-
    figurable in "Calendar.pm" and "Year.pm"
 +  Added some test cases for this new feature
    in "t/m008.t"
 +  The file "examples/calendar.cgi" now
    also supports this new feature
 +  Updated "README.txt" and "INSTALL.txt"
    and the dependency on "Bit::Vector" 7.0
 +  Added an additional "README.htm" file to this
    distribution highlighting its key points
 +  Updated the documentation of "Date::Calc",
    "Date::Calendar", "Date::Calendar::Profiles",
    "Date::Calendar::Year" and "Date::Object"
 +  See the new module "Date::Calc::Util" (which
    is available separately; to be released soon)

CHANGES.txt  view on Meta::CPAN


Version 5.4   03.10.2004

 +  Added compiler directives for C++.
 +  Removed "Carp::Clan" from the distribution (available separately).
 +  Fixed bug in initialization of "Date::Calendar::Year" objects.
 +  Added method "tags()" to "Date::Calendar" and "Date::Calendar::Year".
 +  Fixed the formula for "Labor Day" in the U.S. to "1/Mon/Sep".
 +  Added a new recipe to the "Date::Calc" documentation.
 +  Added Romanian to the list of languages supported by "Date::Calc".
 +  Changed the example script "calendar.cgi" to highlight the name
    which led to a given date being a holiday.
 +  Fixed the Polish entries in "Date::Calc".
 +  Added a few commemorative days to the Norwegian calendar profile.
 +  Added "use bytes" to all Perl files to avoid problems on systems
    not using the standard locale "C".
 +  Fixed test 5 of t/m005.t to (hopefully) work under other locales.

Version 5.3   29.09.2002

 +  Simplified the error message handlers in "Calc.xs".

Version 5.2   18.09.2002

 +  Changed the Polish profiles from ISO-Latin-2 to ISO-Latin-1.
 +  Fixed the broken tests in "t/f034.t" and "t/m006.t".
 +  Synchronized "Carp::Clan" and "ToolBox.h" with "Bit::Vector" 6.2.

Version 5.1   08.09.2002

 +  Integrated modifications needed for MacOS / MacPerl.
 +  Added new method "normalize()" (Date::Calc::Object).
 +  Added a new test script "t/m011.t" for "normalize()".
 +  Added a calendar profile for Mexico (Date::Calendar::Profiles).
 +  Little additions to and corrections of the documentation (Date::Calc).
 +  Added Polish (Date::Calc) and a calendar profile for Poland.
 +  Added Hungarian (Date::Calc).
 +  Added some more commemorative days to the profile of Brazil.

Version 5.0   10.10.2001

Module "Date::Calc":

 +  Added the following new functions:
     *  check_time()
     *  Delta_YMD()

CHANGES.txt  view on Meta::CPAN

 +  Added a missing "#include <stdio.h>" statement in DateCalc.c
    (apparently only relevant to very few platforms).
 +  Now automatically detects Perl's "PL_na" macro or switches to its
    older incarnation (in Calc.xs). Same goes for the "GIMME_V" macro.
 +  Changed the function "Add_Delta_YMD()" to have a more intuitive,
    consistent and reversible behaviour. This might break existing
    code, though. (To get the old behaviour, use the new function
    "Add_Delta_YM()" plus "Add_Delta_Days()" thereafter instead.)
 +  Changed the corresponding test script (t/f029.t) accordingly.
 +  Added an optional boolean parameter "orthodox" to "Calendar()"
    for calendars starting with Sunday instead of Monday.
 +  Changed the behaviour of the "Decode_Date_*()" set of functions:
    if the current year is available on the system, then a "moving
    window" strategy is applied to year numbers < 100; otherwise
    it defaults to the previous behaviour (see version 4.3 below).
 +  Also changed the test scripts t/f016.t, t/f027.t and t/f028.t
    accordingly.
 +  Changed the "Week_of_Year()" function: In scalar context, it
    now returns just the week number. BEWARE, this is a DANGEROUS
    feature - see the manual page for why this is so!
 +  Fixed the misspelled word "whether" in the documentation.

Module "Date::Calc::Object":

 +  Added the module Date::Calc::Object, an object-oriented add-on
    to Date::Calc with overloaded operators.

Modules "Date::Calendar[::(Year|Profiles)]":

 +  Added the modules Date::Calendar, Date::Calendar::Year and
    Date::Calendar::Profiles, for calculations which need to
    take holidays into account (and for generating calendars).

Module "Carp::Clan":

 +  Added the module Carp::Clan (used by all new Date::* modules).

All modules:

 +  Now test scripts for Date::Calc and Carp::Clan ("functions") are
    in files ./t/f*.t, whereas test scripts of other, object-oriented
    modules ("methods") are in files ./t/m*.t.

CHANGES.txt  view on Meta::CPAN


Version 3.2   15.06.1997

 +  Added the function "week_of_year()" in the C core because the C function
    "week_number()" returns the last week of the previous year or the first
    week of the next year in a rather hidden way.
 +  The Perl function "week_number()" was not affected by this change.

Version 3.1   12.06.1997

 +  Added a new function "calendar()" to the "Date::CalcLib" module.
 +  Added a demo program in C named "cal.c_" (imitates the UNIX "cal"
    command) to demonstrate the use of the C core as a stand-alone library.

Version 3.0   16.02.1997

 +  Added the "Date::DateCalcLib" module as a library of useful functions
    that were contained in the various demo files in previous versions.
 +  Modified the demo programs to use this library instead.
 +  Changed the conventions for unsuccessful returns: Now an empty list
    is returned instead of zeros in all list elements. This makes it

CREDITS.txt  view on Meta::CPAN

Many thanks to Tim Zingelman <zingelman@fnal.gov> for reporting the problem
fixed in version 2.3 and for testing an intermediate new version of this
module on his machine!

Many thanks to Jonas Liljegren <jonas@cultcom.se> for posting a subroutine
for calculating easter monday in news:comp.lang.perl.modules and thereby
triggering my writing of the new "Date::CalcLib" module which has been
added in version 3.0 of the "Date::Calc" distribution.

Also many thanks to Claus Tondering <claus@tondering.dk> for his excellent
web pages and FAQ in news:news.answers about calendars and how to calcu-
late easter sunday.

Thanks to Reinhold Stansich <dynaconsult@netway.at> for posting a list
of christian feast days and their offsets from easter sunday in news:
comp.databases.ms-access and to Tammo Schnieder <schniede@hh.sdm.de>
for sending me his posting.

Many thanks to Max Ruffert <mor@mpa-garching.mpg.de> at the Max Planck
Institute for Astrophysics in Garching for looking up Gauss' Rule for
calculating easter sunday (the algorithm which is implemented in the
"Date::CalcLib" module) for me and dictating it to me over the
phone!

Many thanks to Chris Halverson <cdh@CompleteIS.com> for asking me
"is there a "standard" way to create a calendar similar to the output
of cal(1)?", which gave me the idea to write the function "calendar"
which has been added to the module "DateCalcLib" in version 3.1, and
also for the C code demonstrating how to use the C library "lib_date.c"
stand-alone, because that was what he needed to do as well.

Many thanks to Gunardi Wu <gunardi@starindo.net> for notifying me about
the bug in the "Add_Delta_YMD()" function which was fixed in version 4.1.

Thanks to the several people who notified me about two compiler warnings
concerning incompatible character types in Calc.xs line 857 (added two
casts in version 4.2 to fix this flaw).

CREDITS.txt  view on Meta::CPAN

Many thanks to ??? ??? <digitaproc@netscape.net> for sending me excellent
feedback and suggestions. He for instance suggested the possibility to
have individual formatting for different date objects, and the ability
to import/export Unix "time" values.

Many special thanks (k) to my girlfriend Ana Maria Lopes Monteiro
<anamaria_l@hotmail.com> for investigating the brazilian holidays
and commemorative days for me!

Very special thanks to the following people for helping in compiling
and verifying the calendar profiles in Date::Calendar::Profiles:

Abe Timmerman <abe@ztreet.demon.nl>
Abigail <abigail@foad.org>
Aldo Calpini <dada@perl.it>
Andie Posey <andie@posey.org>
Arnaud Calvo <arnaud@calvo-france.com>
Arturo Valdes <arturovaldes@usa.net>
Bart Lateur <bart.lateur@skynet.be>
Brian Graham <brian.graham@nec.com.au>
Bruno Tavares <bat@ip.pt> <bat@dustpuppy.ip.pt>

CREDITS.txt  view on Meta::CPAN

with a list of argentinian holidays!

Many thanks to Morten Sickel <Morten.Sickel@nrpa.no> for reporting why
Excel (erroneously) regards 1900 as a leap year, and why therefore one
should use 31-Dec-1899 as the epoch for converting Excel date values.

Many thanks to Georg Mavridis <GM@mavridis.net> for providing me with
the list of greek holidays.

Many thanks also to Guenther Degenfelder <guenther.degenfelder@datev.de>
for showing me his "Karl" calendar display program, which inspired me
to write the example script "anniversaries.pl" (in the "examples"
subdirectory of this distribution).

Many special thanks to Thomas Wegner <toms_email@gmx.de> for
porting version 5.0 of this module to MacOS and MacPerl. His
port (plus some additions - see below) is now version 5.1.

Thanks to Ken Clarke <perlprogrammer@shaw.ca> for his addition to
the documentation concerning the function "Monday_of_Week()".

CREDITS.txt  view on Meta::CPAN


Thanks to Joachim Ansorg <joachim@ansorgs.de> for sending me the
necessary information to add Romanian to the list of languages
supported by Date::Calc.

Many thanks to Peter Prymmer <PPrymmer@factset.com> for suggesting
a work-around for the problems that can arise when a locale other
than "C" is used!

Thanks to Olle E. Johansson <oej@edvina.net> for sending corrections
for the Swedish calendar profile.

Thanks to Harold van Oostrom <perl@lanceerplaats.nl> for sending in a
fix for the Polish language in Date::Calc. Also many thanks for his patch
to make Date::Calc ready for UTF-8, which unfortunately I haven't had
the time yet to evaluate.

Many thanks also to Sven Geisler <sgeisler@aeccom.com> for sending me
corrections for the profile and official references for ALL federal
states of Australia.

CREDITS.txt  view on Meta::CPAN

Norwegian profile.

Thanks a lot to Jesse Vincent <jesse@bestpractical.com> and to
Alistair Francis <alistair.francis@lokku.com> for reporting the
ongoing problem with the boolean type in MacOS X and to Tatsuhiko
Miyagawa (?) and Alistair Francis for providing patches.

Thanks to Thanos Chatziathanassiou <tchatzi@arx.gr> along with
Barret Clark and Qiang (?) for suggesting some changes to the
documentation. Sorry for not including the changes concerning
the Orthodox and Julian calendars since these are outside of
the scope of this module.

Thanks to Anthony DeRobertis <anthony@derobert.net> and Jonathan
Yu <frequency@cpan.org> for alerting me about the problem that in
Date::Calendar and Date::Calendar::Year, it is hardcoded that
Saturday and Sunday are holidays, and for asking to make this
configurable.

Many thanks to H. Merijn Brand <h.m.brand@xs4all.nl> for triggering
the development of a new normalized date difference function.

DateCalc.c  view on Meta::CPAN

#ifndef MODULE_DATE_CALC
#define MODULE_DATE_CALC
/*****************************************************************************/
/*  MODULE NAME:  DateCalc.c                            MODULE TYPE:  (lib)  */
/*****************************************************************************/
/*          Gregorian calendar date calculations in compliance with          */
/*          ISO/R 2015-1971, DIN 1355 and (to some extent) ISO 8601.         */
/*****************************************************************************/
/*  MODULE IMPORTS:                                                          */
/*****************************************************************************/
#include <stdio.h>                                  /*  MODULE TYPE:  (sys)  */
#include <stdlib.h>                                 /*  MODULE TYPE:  (sys)  */
#include <string.h>                                 /*  MODULE TYPE:  (sys)  */
#include <time.h>                                   /*  MODULE TYPE:  (sys)  */
#include "ToolBox.h"                                /*  MODULE TYPE:  (dat)  */
/*****************************************************************************/

DateCalc.h  view on Meta::CPAN

#ifndef MODULE_DATE_CALC
#define MODULE_DATE_CALC
#ifdef __cplusplus
extern "C"
{
#endif
/*****************************************************************************/
/*  MODULE NAME:  DateCalc.h                            MODULE TYPE:  (lib)  */
/*****************************************************************************/
/*          Gregorian calendar date calculations in compliance with          */
/*          ISO/R 2015-1971, DIN 1355 and (to some extent) ISO 8601.         */
/*****************************************************************************/
/*  MODULE IMPORTS:                                                          */
/*****************************************************************************/
#include <stdio.h>                                  /*  MODULE TYPE:  (sys)  */
#include <stdlib.h>                                 /*  MODULE TYPE:  (sys)  */
#include <string.h>                                 /*  MODULE TYPE:  (sys)  */
#include <time.h>                                   /*  MODULE TYPE:  (sys)  */
#include "ToolBox.h"                                /*  MODULE TYPE:  (dat)  */
/*****************************************************************************/

README.txt  view on Meta::CPAN

                   ========================================
                     Package "Date::Calc::XS" Version 6.4
                   ========================================


Abstract:
---------

This package provides all sorts of date calculations based on the Gregorian
calendar (the one used in all western countries today).

The package is designed as an efficient (and fast) toolbox, not a bulky
ready-made application. It provides extensive documentation and examples
of use, multi-language support and special functions for business needs.

Moreover, it optionally provides an object-oriented interface with overloaded
operators for greater convenience, and calendar objects which support
profiles of legal holidays and observances for calculations which need to
take those into account.


What's new in version 6.4:
--------------------------

 +  Fixed t/f016.t, t/f027.t and t/f028.t which started failing on 01/01/2015
 +  Fixed t/f035.t which gave a warning "Unescaped left brace in regex is deprecated"
    with Perl 5.21.x



( run in 0.522 second using v1.01-cache-2.11-cpan-c333fce770f )