Astronomical
NAME
Date::Calendar::Bahai::Astronomical - Conversions from / to the astronomical Baháʼí calendar
SYNOPSIS
Converting a Gregorian date (e.g. 17th May 2021) into Baháʼí
use Date::Calendar::Bahai::Astronomical;
my Date $dt-greg;
my Date::Calendar::Bahai::Astronomical $dt-bahai;
$dt-greg .= new(2021, 5, 17);
$dt-bahai .= new-from-date($dt-greg);
say $dt-bahai;
# --> 0178-04-02
say $dt-bahai.strftime("%A %d %B %Y");
# --> Kamál 02 ‘Aẓamat 0178
Converting a Bahai date (e.g. Jalál 1 Bahá 178) into Gregorian
use Date::Calendar::Bahai::Astronomical;
my Date::Calendar::Bahai::Astronomical $dt-bahai;
my Date $dt-greg;
$dt-bahai .= new(year => 178, month => 1, day => 1);
$dt-greg = $dt-bahai.to-date;
say $dt-greg;
# --> 2021-03-20
DESCRIPTION
Date::Calendar::Bahai::Astronomical is a class representing dates in the astronomical Baháʼí calendar, as defined by the 2015 reform. It allows you to convert a Baháʼí date into Gregorian or into other implemented calendars, and it allows you to convert dates from Gregorian or from other calendars into Baháʼí.
The distribution provides also the Date::Calendar::Bahai class which gives the arithmetic version of the Baháʼí calendar. For Gregorian dates in the 1844--2014 interval, that is before the reform, the arithmetic and astronomical versions give the same results.
The astronomical Baháʼí calendar is only partially implemented. It can represent dates only in the 1 to 221 years (1844 to 2064 in the Gregorian calendar).
Please see Date::Calendar::Bahai for the complete documentation.
SEE ALSO
Raku Software
Date::Calendar::Strftime or https://github.com/jforget/raku-Date-Calendar-Strftime
Date::Calendar::Gregorian or https://github.com/jforget/raku-Date-Calendar-Gregorian
Date::Calendar::Julian or https://github.com/jforget/raku-Date-Calendar-Julian
Date::Calendar::Hebrew or https://github.com/jforget/raku-Date-Calendar-Hebrew
Date::Calendar::Hijri or https://github.com/jforget/raku-Date-Calendar-Hijri
Date::Calendar::Persian or https://github.com/jforget/raku-Date-Calendar-Persian
Date::Calendar::CopticEthiopic or https://github.com/jforget/raku-Date-Calendar-CopticEthiopic
Date::Calendar::MayaAztec or https://github.com/jforget/raku-Date-Calendar-MayaAztec
Date::Calendar::FrenchRevolutionary or https://github.com/jforget/raku-Date-Calendar-FrenchRevolutionary
Perl 5 Software
Other Software
date(1), strftime(3)
calendar/cal-bahai.el in emacs or xemacs.
CALENDRICA 4.0 -- Common Lisp, which can be download in the "Resources" section of https://www.cambridge.org/us/academic/subjects/computer-science/computing-general-interest/calendrical-calculations-ultimate-edition-4th-edition?format=PB&isbn=9781107683167
Book
Calendrical Calculations (Third or Fourth Edition) by Nachum Dershowitz and Edward M. Reingold, Cambridge University Press, see http://www.calendarists.com or https://www.cambridge.org/us/academic/subjects/computer-science/computing-general-interest/calendrical-calculations-ultimate-edition-4th-edition?format=PB&isbn=9781107683167.
Internet
https://bahai-library.com/uhj_badi_calendar_2014
https://www.badi-calendar.com/faq.php
https://www.funaba.org/cc (website no longer works).
https://en.wikipedia.org/wiki/Bah%C3%A1%27%C3%AD_calendar
https://icalendrier.fr/calendriers-saga/calendriers/baha-i (in French)
AUTHOR
Jean Forget <J2N-FORGET at orange dot fr>
COPYRIGHT AND LICENSE
Copyright (c) 2021, 2024 Jean Forget, all rights reserved.
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.