which-calendar - Figure out which calendar a date is in
which-calendar 1732-2-11 which-calendar -reform-date uk 1732-2-11 which-calendar -help which-calendar -version
This option displays the documentation for this script. The script then exits.
-method ymd
This option specifies the method to call to generate results. The default is 'calendar_name'.
'calendar_name'
-reform-date uk
This option specifies a reform date to use for the determination. The default is the default for DateTime::Calendar::Christian, which is 'italy'.
'italy'
This option displays the version of this script. The script then exits.
This Perl script takes as command arguments one or more ISO-8601-ish dates, and displays each date and the calendar the date is in ('Gregorian' or 'Julian').
'Gregorian'
'Julian'
The date is a string containing year, month, day, hour, minute and second, punctuated by non-numeric characters. Only the year is required.
The calendar name is obtained by instantiating a DateTime::Calendar::Christian object with each specified date, and then calling its calendar_name() method. The logic actually works with any method that takes no arguments and returns a string, so the -method option is provided for those who want to play around with the functionality.
calendar_name()
Thomas R. Wyant, III (wyant at cpan dot org)
Copyright (C) 2016-2021 by Thomas R. Wyant, III
This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full text of the licenses in the directory LICENSES.
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.
To install DateTime::Calendar::Christian, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DateTime::Calendar::Christian
CPAN shell
perl -MCPAN -e shell install DateTime::Calendar::Christian
For more information on module installation, please visit the detailed CPAN module installation guide.