Path: news.ruhr-uni-bochum.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!RRZ.Uni-Koeln.DE!news.ecrc.de!news.ecrc.de!news.compuserve.com!imci4!newsfeed.internetmci.com!news.cloud9.net!newsfeed.direct.ca!nntp.teleport.com!usenet
From: [email protected] (Steffen Beyer)
Newsgroups: comp.lang.perl.announce,comp.lang.perl.misc
Subject: ANNOUNCE: Date::DateCalc v 2.2 (bugfix)
Followup-To: comp.lang.perl.misc
Date: 27 Jun 1996 18:11:11 GMT
Organization: sd&m GmbH & Co. KG Munich, Germany
Lines: 116
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: news.ruhr-uni-bochum.de comp.lang.perl.announce:360 comp.lang.perl.misc:35390


A bug in the module "Date::DateCalc" has been fixed (see below for details).
The new version 2.2 is available at the usual ftp sites (see also below for
more details).

=======================================
 Module "Date::DateCalc" Version 2.2
=======================================

Requirements:
-------------

Perl version 5.000 or higher, a compiler complying with ANSI C standards (!).
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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).

To give you an idea of what the package can do, here a list of all the
functions it exports:

 $flag = leap($year);
 $date = compress($yy,$mm,$dd);
 ($cc,$yy,$mm,$dd) = uncompress($date);
 $flag = check_compressed($date);
 $datestr = compressed_to_short($date);
 $flag = check_date($year,$mm,$dd);
 $days = calc_days($year,$mm,$dd);
 $weekday = day_of_week($year,$mm,$dd);
 $days = dates_difference($year1,$mm1,$dd1,$year2,$mm2,$dd2);
 ($year,$mm,$dd) = calc_new_date($year,$mm,$dd,$offset);
 ($days,$hh,$mm,$ss) = date_time_difference
 (
     $year1,$month1,$day1,$hh1,$mm1,$ss1,  # calculates date2
     $year2,$month2,$day2,$hh2,$mm2,$ss2   # minus date1
 );
 ($year,$month,$day,$hh,$mm,$ss) = calc_new_date_time
 (
     $year,$month,$day,$hh,$mm,$ss,
     $days_offset,$hh_offset,$mm_offset,$ss_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);
 $day_name = day_name_tab($weekday);
 $month_name = month_name_tab($month);
 $weekday = decode_day($day_name);
 $month = decode_month($month_name);
 ($year,$mm,$dd) = decode_date($date);
 $days = days_in_month($year,$mm);
 $version = Date::DateCalc::Version();

For more details, see the Date::DateCalc(3) man page!

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

Version 2.2 fixes a bug concerning arrays as parameters: enabling
prototypes in DateCalc.xs caused

   ($year,$mm,$dd) = first_in_week(week_number($year,$mm,$dd));

to generate Perl compilation errors, because "week_number" passes
an array to "first_in_week". To circumvent this, you had to pass
arrays explicitly, element by element:

   @w = week_number($year,$mm,$dd);
   ($year,$mm,$dd) = first_in_week( $w[0], $w[1] );

With version 2.2, this workaround is obsolete.

Thanks:
-------

Many thanks to Jonathan Lemon <[email protected]> for reporting
this bug and how to fix it!

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 "The Perl 5 Module List" by Tim Bunce and Andreas Koenig
in news:comp.lang.perl.announce for a list of CPAN ftp servers)

Final note:
-----------

Please report any comments, problems, suggestions, findings, complaints,
questions, insights, compliments or donations ;-) and so on to:

[email protected] (Steffen Beyer)

Have fun!

Best regards,
--
Steffen Beyer ________________________ C:\ONGRATLN.W95 _______________________
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.