1DateTime::Calendar::JulUisaenr(3C)ontributed Perl DocumeDnattaetTiiomne::Calendar::Julian(3)
2
3
4
6 DateTime::Calendar::Julian - Dates in the Julian calendar
7
9 use DateTime::Calendar::Julian;
10
11 $dt = DateTime::Calendar::Julian->new( year => 964,
12 month => 10,
13 day => 16,
14 );
15
16 # convert Julian->Gregorian...
17
18 $dtgreg = DateTime->from_object( object => $dt );
19 print $dtgreg->datetime; # prints '0964-10-21T00:00:00'
20
21 # ... and back again
22
23 $dtjul = DateTime::Calendar::Julian->from_object( object => $dtgreg );
24 print $dtjul->datetime; # prints '0964-10-16J00:00:00'
25
27 DateTime::Calendar::Julian implements the Julian Calendar. This module
28 implements all methods of DateTime; see the DateTime(3) manpage for all
29 methods.
30
32 This module implements one additional method besides the ones from
33 DateTime, and changes the output of one other method.
34
35 · gregorian_deviation
36
37 Returns the difference in days between the Gregorian and the Julian
38 calendar.
39
40 · datetime
41
42 This method is now equivalent to:
43
44 $dt->ymd('-') . 'J' . $dt->hms(:)
45
47 The Julian calendar was introduced by Julius Caesar in 46BC. It
48 featured a twelve-month year of 365 days, with a leap year in February
49 every fourth year. This calendar was adopted by the Christian church
50 in 325AD. Around 532AD, Dionysius Exiguus moved the starting point of
51 the Julian calendar to the calculated moment of birth of Jesus Christ.
52 Apart from differing opinions about the start of the year (often
53 January 1st, but also Christmas, Easter, March 25th and other dates),
54 this calendar remained unchanged until the calendar reform of pope
55 Gregory XIII in 1582. Some backward countries, however, used the
56 Julian calendar until the 18th century or later.
57
58 This module uses the proleptic Julian calendar for years before 532AD,
59 or even 46BC. This means that dates are calculated as if this calendar
60 had existed unchanged from the beginning of time. The assumption is
61 made that January 1st is the first day of the year.
62
63 Note that BC years are given as negative numbers, with 0 denoting the
64 year 1BC (there was no year 0AD!), -1 the year 2BC, etc.
65
67 Support for this module is provided via the datetime@perl.org email
68 list. See http://lists.perl.org/ for more details.
69
70 Bug reports will be accepted as RT tickets or by mail to Wyant.
71
73 Eugene van der Pijll <pijll@gmx.net>
74
75 Thomas R. Wyant, III wyant at cpan dot org
76
78 Copyright (c) 2003 Eugene van der Pijll. All rights reserved.
79
80 Copyright (C) 2018 Thomas R. Wyant, III
81
82 This program is free software; you can redistribute it and/or modify it
83 under the same terms as Perl itself.
84
85 This program is distributed in the hope that it will be useful, but
86 without any warranty; without even the implied warranty of
87 merchantability or fitness for a particular purpose.
88
90 DateTime
91
92 DateTime::Calendar::Christian
93
94 datetime@perl.org mailing list
95
96 <http://datetime.perl.org/>
97
98
99
100perl v5.28.1 2018-12-21 DateTime::Calendar::Julian(3)