Open jforget opened 3 years ago
Oops! I have inserted Perl-like comments with a hash, they produce lines in big characters!
So suppose that the big lines are actually Perl comments.
Jean Forget
Thanks @jforget for reporting the issue. I assume you looked at it very closely, do you have handy solution by any chance? If yes then please do share with me.
#
The following program triggers an "uninitialized value" error message
#
use Date::Bahai::Simple; my $date = Date::Bahai::Simple->new({ major => 1, cycle => 10, year => 1, month => 1, day => 1 });
prints equivalent Bahai date of the given Gregorian date.
print $date->from_gregorian(2021, 3, 2), "\n";
Same thing for all days until 2021-03-20
END
A few notes: the Bahai year is divided into 19 months of 19 days each and a period of 4 additional days. Unlike the Coptic, Ethiopian and French Revolutionary calendars, the additional days are not at the end of the year, but before the last month, that is, between month "Mulk" and month "Ala".
The numbering scheme is different between Reingold's and Dershowitz' calendar.l on one hand and https://www.funaba.org/cc and ANDY's Date::Converter on the other hand.
For calendar.l
Month Mulk (2021-02-07 to 2021-02-25) is numbered 18 Additional days (2021-02-26 to 2021-03-01) are numbered "month 0" Month Ala (2021-03-02 to 2021-03-20) is numbered 19.
For https://www.funaba.org/cc and ANDY's Date::Converter
Month Mulk (2021-02-07 to 2021-02-25) is numbered 18 Additional days (2021-02-26 to 2021-03-01) are numbered "month 19" Month Ala (2021-03-02 to 2021-03-20) is numbered 20.