Path: usenet.cis.ufl.edu!usenet.eel.ufl.edu!news.uoregon.edu!news.jsums.edu!news2.cais.net!news.cais.net!news.structured.net!nntp.teleport.com!usenet
From:
[email protected] (Steffen Beyer)
Newsgroups: comp.lang.perl.announce,comp.lang.perl.misc
Subject: ANNOUNCE: Date::DateCalc 1.4
Followup-To: comp.lang.perl.misc
Date: 28 Feb 1996 03:56:27 GMT
Organization: sd&m GmbH & Co. KG Munich, Germany
Lines: 93
Approved:
[email protected] (comp.lang.perl.announce)
Message-ID: <
[email protected]>
Reply-To:
[email protected]
NNTP-Posting-Host: julie.teleport.com
X-Disclaimer: The "Approved" header verifies header information for article transmission and does not imply approval of content.
Xref: usenet.cis.ufl.edu comp.lang.perl.announce:274 comp.lang.perl.misc:22036
The module "Date::DateCalc" has been further refined and is now available
as version 1.4 at the usual ftp sites (see below for more details).
=======================================
Module "Date::DateCalc" Version 1.4
=======================================
What does it do:
----------------
The package provides a Perl interface to a C library which offers a wide
variety of date calculations, complying with the ISO/R 2015-1971 and DIN
1355 standards which specify things as what leap years are, when they
occur, how the week numbers are defined, what's the first day of the week,
how many weeks (52 or 53) a given year has, and so on (Gregorian calendar,
as opposed to the Julian calendar, which was used until 1582).
Many users have craved for a simple module that uses the XS interface to
incorporate a C library, in order to be able to learn from it, since the
PERLAPI and PERLGUTS sections of the Perl 5 manual are not complete and
easy to put into practice. So here it is!
To give you an idea of what the package can do, here a list of all the
functions it exports:
$flag = leap($year);
$date = encode($yy,$mm,$dd);
($cc,$yy,$mm,$dd) = decode($date);
$flag = valid_date($date);
$datestr = date_string($date);
$flag = check_date($year,$mm,$dd);
$days = calc_days($year,$mm,$dd);
$days = dates_difference($year1,$mm1,$dd1,$year2,$mm2,$dd2);
$weekday = day_of_week($year,$mm,$dd);
($year,$mm,$dd) = calc_new_date($year,$mm,$dd,$offset);
$datestr = date_to_short($year,$mm,$dd);
$datestr = date_to_string($year,$mm,$dd);
($week,$year) = week_number($year,$mm,$dd);
($year,$mm,$dd) = first_in_week($week,$year);
$weeks = weeks_in_year($year);
($year,$mm,$dd) = decode_date($buffer);
$day = day_short_tab($weekday);
$day = day_name_tab($weekday);
$month = month_short_tab($mm);
$month = month_name_tab($mm);
$days = days_in_month($year,$mm);
$version = Date::DateCalc::Version();
What's new:
-----------
>From version 1.3 on, the C library "lib_date.c" is compiled separately; it is
no longer '#include'd in the XS file. Moreover, the function "days_in_month"
was added.
Version 1.4 fixes a bug in DateCalc.xs where the function newSVnv(double)
was used instead of newSViv(IV) although an integer value is passed to it.
Thanks:
-------
Many thanks to Christian <
[email protected]> for reporting the bug
fixed in version 1.4, which showed up on an HP E55 running HP-UX 10.01 and
Perl 5.001m with the c89 Ansi 89 compiler from HP.
Also many thanks to David Thompson <
[email protected]> for reporting a
problem he encountered concerning the inclusion of the Perl distribution
("Unable to find include file ...") and for suggesting a solution for this
problem. (That's the most pleasant kind of problem report, of course! ;-) )
Where to find:
--------------
At the usual ftp sites for Perl (CPAN = "Comprehensive Perl Archive Network"),
under .../CPAN/authors/id/STBEY/
or .../CPAN/modules/by-category/06_Data_Type_Utilities/Date/
or .../CPAN/modules/by-module/Date/
(See news:comp.lang.perl.announce for a list of CPAN ftp servers)
Have fun!
Best regards,
--
Steffen Beyer
mailto:
[email protected] |s |d &|m | software design & management GmbH&Co.KG
phone: +49 89 63812-244 | | | | Thomas-Dehler-Str. 27
fax: +49 89 63812-150 | | | | 81737 Munich, Germany.