A. van Roggen schreef:
> I suggest, therefore, that if the combined calendar is made, it be
> given subcategories, dependent on the switchover date, and to keep the
> name short (as seems to be desirable, see above). The name could be
> "JG16000101" or such if the switch was made at the start of 1600.
> This immediately clarifies which calendar is used, and it is easy
> enough in Perl to establish an alias which is location oriented, e.g.
> "JGParis" or "JGStrassbourg" in case these cities have different time
> systems.
I'm not planning any subclasses of DT::C::Christian at the moment [*].
If you want to use a different calendar than the default (which switches
at 1582-10-15 = 1582-10-05 J), you can do it in basically two ways:
# $r is the date that the UK switched to Gregorian
my $r = DateTime->new( year => 1752, month => 9, day => 14 );
# You can specify the reform date in the constructor...
my $d = DateTime::Calendar::Christian
->new( year => 1700, month => 1, day => 1,
reform_date => $r );
# ... or you can create a DT::C::Christian object containing the
# reform date...
my $english_calendar = DateTime::Calendar::Christian
->new( reform_date => $r );
# ... and use that object to create new dates.
my $d2 = $english_calendar->new( year => 1700, month => 1, day => 1
);
In future, I'll include the known reform dates, so you can say
my $d = DateTime::Calendar::Christian->new( ...,
reform_date => 'UK');
> One note on the 'religious' aspect of the name. It might be better to
> use the tem 'western' rather than 'christian' or 'catholic' [the
> latter even has 2 major branches ruled from Rome and Constantinople).
> The "Western society" used this calendar, independent of the local
> religion, although, as mentioned, the switch-over time was influenced
> by local religion, but probably more for political than religious
> reasons.
Western society has used several calendars. The Roman calendar (from the
foundation of the city) was used widely in early times.
I still prefer the name "Christian". Like it or not, this calendar is
originally based in religion.
Eugene
[*] Except DateTime::Calendar::Christian::Sweden, sometime in the
future, because that's a special case.