Subject: ANNOUNCE: Date::DateCalc 2.1
From: [email-masked] (Steffen Beyer)
Date: 27 May 1996 10:36:00 GMT
Newsgroups: comp.lang.perl.announce,comp.lang.perl.misc

The module "Date::DateCalc" has been further refined and is now available
as version 2.1 at the usual ftp sites (see below for more details).

=======================================
  Module "Date::DateCalc" Version 2.1
=======================================

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.1:
--------------------------

The man page is no separate file anymore, it is now included in the
file DateCalc.pm in POD format, where it will automatically be found
and installed in your "man" directory by "make install".

Moreover, version 2.1 fixes a minor bug in lib_date.c:
wrong:    if ((*ss <= 60) and (*mm <= 60) and (*hh <= 24) and
right:    if ((*ss < 60) and (*mm < 60) and (*hh < 24) and
and includes some other minor adjustments in orthography and style,
plus adaptations to conform with new Perl 5.002 module standards
(concerning "VERSION_FROM").

Thanks:
-------

Many thanks to Tom Limoncelli <[email-masked]> for raising the question on
how to calculate the 2nd Thursday of a given month and year!

Many thanks to Bart Robinson <[email-masked]> for suggesting the "all"
export option and the "decode_day" and "decode_month" functions.

Also many thanks to Ron Savage <[email-masked]> for suggesting
the incorporation of time calculations into this module. (Sorry that I
didn't include the handling of time zones, which can be taken care of
more easily by adding/subtracting the appropriate time value in an extra,
preliminary step!)

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)

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

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

[email-masked] (Steffen Beyer)

Have fun!

Best regards,
--
Steffen Beyer
mailto:[email-masked]        |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.