1DateTime::Calendar::JulUisaenr(3C)ontributed Perl DocumeDnattaetTiiomne::Calendar::Julian(3)
2
3
4

NAME

6       DateTime::Calendar::Julian - Dates in the Julian calendar
7

SYNOPSIS

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

DESCRIPTION

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

METHODS

32       This module implements one additional method besides the ones from
33       DateTime, and changes the output of one other method.
34
35       •   calendar_name
36
37           Returns 'Julian'.
38
39       •   gregorian_deviation
40
41           Returns the difference in days between the Gregorian and the Julian
42           calendar.
43
44       •   datetime
45
46             print $dt->datetime( $sep ), "\n";
47
48           This method is equivalent to
49
50             join $sep, $dt->ymd( '-' ), $dt->hms( ':' );
51
52           The $sep argument defaults to 'J'.
53
54           Caveat: the optional argument was added to this method in version
55           1.02, to belatedly track a change made in DateTime version 1.43
56           released 2017-05-29. Fixing this restores the original
57           stringification behavior of this class, which was to return an
58           ISO-8601 string unless a formatter was set. Before this change, the
59           stringification separated date and time with either a 'T' or a 'J',
60           depending on which version of DateTime was installed.
61
62       Note that as of version "0.106_01", methods related to quarters should
63       work.
64

BACKGROUND

66       The Julian calendar was introduced by Julius Caesar in 46BC.  It
67       featured a twelve-month year of 365 days, with a leap year in February
68       every fourth year.  This calendar was adopted by the Christian church
69       in 325AD.  Around 532AD, Dionysius Exiguus moved the starting point of
70       the Julian calendar to the calculated moment of birth of Jesus Christ.
71       Apart from differing opinions about the start of the year (often
72       January 1st, but also Christmas, Easter, March 25th and other dates),
73       this calendar remained unchanged until the calendar reform of pope
74       Gregory XIII in 1582.  Some backward countries, however, used the
75       Julian calendar until the 18th century or later.
76
77       This module uses the proleptic Julian calendar for years before 532AD,
78       or even 46BC.  This means that dates are calculated as if this calendar
79       had existed unchanged from the beginning of time.  The assumption is
80       made that January 1st is the first day of the year.
81
82       Note that BC years are given as negative numbers, with 0 denoting the
83       year 1BC (there was no year 0AD!), -1 the year 2BC, etc.
84

SUPPORT

86       Support for this module is provided via the datetime@perl.org email
87       list. See <https://lists.perl.org/> for more details.
88
89       Please report bugs to
90       <https://rt.cpan.org/Public/Dist/Display.html?Name=DateTime-Calendar-Julian>,
91       <https://github.com/trwyant/perl-DateTime-Calendar-Julian/issues>, or
92       in electronic mail to wyant@cpan.org.
93

AUTHOR

95       Eugene van der Pijll <pijll@gmx.net>
96
97       Thomas R. Wyant, III wyant at cpan dot org
98
100       Copyright (c) 2003 Eugene van der Pijll.  All rights reserved.
101
102       Copyright (C) 2018-2022 Thomas R. Wyant, III
103
104       This program is free software; you can redistribute it and/or modify it
105       under the same terms as Perl itself.
106
107       This program is distributed in the hope that it will be useful, but
108       without any warranty; without even the implied warranty of
109       merchantability or fitness for a particular purpose.
110

SEE ALSO

112       DateTime
113
114       DateTime::Calendar::Christian
115
116       datetime@perl.org mailing list
117
118       <http://datetime.perl.org/>
119
120
121
122perl v5.38.0                      2023-07-20     DateTime::Calendar::Julian(3)
Impressum