This site supports any browser, including Lynx!
Noam Chomsky on "Terror and Just Response"
(Noam Chomsky is one of the fathers of Computer Science, like John von Neumann, Alan Turing, Konrad Zuse, Ludwig Wittgenstein, Norbert Wiener, etc.!)
André Vltchek: "Western Terror: From Potosí To Baghdad"

Date::Calc 5.4 Demo: International Eternal Gregorian Calendar
Date::Calc 5.4 Demo: Sports Club Events Calendar


Date::Calc
Manual Page


Homepage
What's New
Who am I
Site Map
Foto Gallery
Download
Perl Links
Toggle Server
Brasil
Credits
Macintosh

See

[search.cpan.org]

for the latest manual page.

Date::Calc

[Date::Calc]

What is it for?

Date calculations, e.g.
  • "Basic stuff" like leap year, "Julian day" (or "date"), day-of-week, days in month/year, etc.
  • Comparing dates
  • Conversion from a date (e.g. 01-Jun-2004) to the number of days (e.g. 731733) and vice-versa
  • Calculating a date (e.g. 01-Jun-2004) plus/minus a number of days (e.g. +35) yielding a new date (e.g. 06-Jul-2004)
  • Calculating the nth day-of-week of a month and year (e.g. the first Tuesday of July 2004 = 06-Jul-2004)
  • Calculating differences between dates (and/or times)
  • Calculating Easter Sunday and holidays depending on it
  • ...
based on

Philosophy

  • Toolbox, not a (heavy) ready-made application
  • Interoperable, "LEGO system"
  • Spirit of UNIX command-line tools (be small, do only one thing, and be good at it)

What it is _NOT_

What it _IS_

  • A module _primarily_ for performing _calculations_ with dates (nomen est omen)
  • A module intended to be _small_ (low memory footprint) and _fast_ (for heavy-duty applications)

Features

  • Extrapolates the Gregorian calendar back beyond 1582 until 1 A.D.
    (historically _not_ meaningful, but may nevertheless be useful)
  • Numerical range extends as far as "int" data type permits, i.e., at least until the year 32767
  • Basic date parsing (input) and formatting (output)
  • Support for various languages (input and output)
    (Currently 14 as of version 5.4; English, French, German, Spanish, Portuguese, Dutch, Italian, Norwegian, Swedish, Danish, Finnish, Hungarian, Polish and Romanian)
  • Calculations on dates, with and without time (including timezone offsets)
  • Interface to localtime(), gmtime(), mktime() plus own conversion routines (with more predictable results)
  • Internally written in C for smaller memory usage, faster execution and possibility to use in C applications
  • The documentation of "Date::Calc" gives model solutions to common problems in its "RECIPES" section
  • Optionally provides date objects (i.e., an OO interface) for greater ease of use (Perl only) (Date::Calc::Object)
  • Comprises a module for date calculations taking legal holidays into account (Perl only) (Date::Calendar)
  • Provides a rich set of holiday profiles for numerous countries (Perl only) (Date::Calendar::Profiles)

Limitations

  • The language setting in "Date::Calc" is a global variable (= BEWARE when using threads!)
  • The modules "Date::Calendar" and "Date::Calendar::Year" only operate on years between 1583 and 2299
  • Uses the ISO-Latin-1 character set, even for languages (such as Polish) not entirely representable in that character set (uses the "plain" characters instead in such cases)
  • The calendar profiles usually do not take historical irregularities into account, they only provide means for calculating _regularly_ recurring events (the profiles should therefore not be relied on for historical faithfulness)

See also


Last modified: Tuesday, 03-Jun-2008 23:10:32 CEST

Copyright © 1997 - 2005 by Steffen Beyer.
All rights reserved.

(Except where stated otherwise or obvious)

The contents of this web site which are owned and copyrighted by me can be used and redistributed under the terms of the
GNU Free Documentation License.

Disclaimer:

I hereby declare that hyperlinks on this web site to other web sites do not necessarily represent my opinion, that I do not assume any responsibility or liability for the contents of the web sites linked to, and that hyperlinks on this site are merely a hint that something there might be worth reading or knowing, for the good or bad. I am unable to monitor all these web sites and their contents. Therefore, use the hyperlinks on this web site at your own risk!

[Powered by Apache]