This method is the class constructor. It can be invoked in quite a lot
of different ways:
|roman||Called without arguments, it returns the date in the roman format (see the DATE FORMATS section below). If is called with one arguments it assumes it is a date string in the roman format, and sets the date to it.|
|ical||Called without arguments, it returns the date in the ical format (see the DATE FORMATS section below). If is called with one arguments it assumes it is a date string in the ical format, and sets the date to it.|
This method returns a printable version of the date in the classical
Roman format. The format of the returned string can be controlled with
the parameters passed to the method. Parameters are passed to the
method using the classical hash like approach:
The method as_string accepts the following parameters:
|add||Takes as argument an integer $n and returns a new <B>Date::RomanB> object representig the date obtained adding $n days to the present date.|
Returns the yesterday date. Calling
is the same thing as calling
Returns the tomorrow date. Calling
is the same thing as calling
1. Add time management. This will require to determine sunraise/sunset time for the given day. 2. Change the _leap subroutine to reflect the fact that between 45 BC (709 AUC) and 9 BC (745 AUC) there was a leap year every <B>threeB> years, then between 8 BC (744 AUC) and 7 AD (760 AUC) there was no leap year to make up for the three exceeding leap years. 3. Add Ante Urbe Condida years. 4. Rewrite the module in Latin using the <B>Lingua::Romana::PerligataB> module.
Dates can be specified by a string in one of two formats: roman and ical.
The roman format.It is a simplified version of the roman way to write dates (see the section THE ROMAN CALENDAR below). It is defined by the following ABNF specification (see rfc2234):
<roman date> = [<prefix><spaces>]<fixed day><spaces><mons><spaces><annus> <prefix> = 1*2DIGIT ; "1".."4" / "1".."6" / "1".."8" / ; "1".."16" / "1".."17" / ; "1".."18" / "1".."19" ; according to <mons> <fixed day> ; value. <prefix> /= "b6" ; only for <mons> equal to "3", <fixed day> ; equal to "kal" and <annus> equal to a ; leap year. <fixed day> = "kal" / "non" / "id" <mons> = 1*2DIGIT ; "1".."12" <annus> = 1*DIGIT <spaces> = 1*WSP
We use the b6 prefix to indicate the leap day (24th february) introduced in leap tears. As it is stated below in section The days in the Roman calendar, this was again the 6th day before the Kalendae of March, exatly as the day after.
The ical formatThe ical format is a generalization of the format for dates defined in rfc2445. The genralization consists in allowing a year in less than 4 digits and in allowing a prefixed - to represents years before 1 BC. More specifically, a ical date string is defined by the following ABNF specification (see rfc2234):
As it is customary, we use 0 to represent the year 1 BC, -1 to represent the year 2 BC and so on.
Julius Caesar made his famous calendar reform in 45 BC. According to this reform, the year was of 365 days, divided in 12 months: Ianuarius, 31 days; Februaarius, 28 days, Martius, 31 days; Aprilis, 30 days; Maius, 31 days, Iunius, 30 days, Iulius, 31 days; Sextilis 31 days, September, 30 days, October, 31 days; November, 30 days; and December, 31 days. Later, Sextilis became Augustus (to simplify, we used Augustus as name of the 8th month trought the module).
To make up with the fact that the tropical year is a little longer than 365 days, Julius Caesar decreed that one year in 4 should be longer by one day, adding one day to Februarius.
Due to a misunderstandig about what one year in 4 meant, between 45 BC and 9 BC there was a leap year every three years. To make up for the surplus of leap years so introduced, emperor Augustus decreed a 15 years period without leap years, so that the first leap year after 9 BC was 8 AD. Then there was a leap year every 4 years until the Gregorian Reform. This module take into account the Gregorian reform assuming that it took place in 1582 AD. It does not take into account the problems in determining leap years between 45 BC and 8 AD (at least it does not yet, see the section TODO above).
The Romans didnt number the days sequentially from 1. Instead they had three fixed days in each month:
The others days, where designed counting backward from these fixed days. It should be remarked that, in counting backward, the romans used an inclusive counting. That way, for instance, the 2 Jan was the 4th day before the nones of January (the nones of January being the 5th of January).
Kalendae which was the first day of the month; Idus which was the 13th day of January, February, April, June, August, September, November, and December and the 15th day of March, May, July, or October; Nonae which was the 9th day befor the Idus (counting Idus itself as the first day).
The day before a fixed day was designed by pridie, abbreviated as p.d.. The other days was designed using the formula ante diem, abbreviated as a.d.. For instance, the 16th of April was ante diem XVI Kalendas Maias, abbreviated as a.d. Kal. Mai.
Romans counted years starting from the mitical foundation of Rome by Romolus on 21st April, 753 BC. Fr instance, year 2002 AD is the year 2755 AUC (ab Urbe condita, after the foundation of the City).
Before Julius Caesar introduced the Julian calendar in 709 AUC, the Roman calendar was a mess, and much of our so-called knowledge about it seems to be little more than guesswork. This module uses the Julian calendar also for dates before the 1 Jan 45 BC (or, more precisely, Kalendas Ianuariis DCCIX AUC). This is the so called proleptic Julian calendar and it is consistent with the historians habit to do so.
Leo Cacciari, aka TheHobbit <email@example.com>
I would like to thanks people who helped me to get this module right:
o The people on the firstname.lastname@example.org mailing list, expecially Rich Bowen <email@example.com>, Elaine -HFB- Ashton <firstname.lastname@example.org> and Jean Forget <J-FORGET@wanadoo.fr>. o The people on the iclp (it.comp.lang.perl) newsgroup, expecially Aldo Calpini <email@example.com>. o Marco, aka Diese| from the #roma2 IRCnet channel, who helped me with Latin. Any Latin error which is still there is mine, the ones that went away did so thanks to him.
This software is Copyright 2002 by Leo Cacciari. This software is free software; you can redistribute it and/or modify it under the terms of the Perl Artistic License, either as stated in the enclosed LICENSE file or (at your option) as given on the Perl home site: http://www.perl.com/language/misc/Artistic.html
o The perl(1) man page. o The Roman(3) man page. o The Date::ICal(3) man page.
Any Latin textbook.
The very good Frequently Asked Questions about Calendars by Claus Tondering. You can found it at http://www.tondering.dk/claus/calendar.html See especially section 2.7.
|v. 1.06||DATE::ROMAN (3)||a.d. XI Kal. Mai. MMDCCLV AUC|