Author image Tom Wyant
and 4 contributors

TITLE

which-calendar - Figure out which calendar a date is in

SYNOPSIS

 which-calendar 1732-2-11
 which-calendar -reform-date uk 1732-2-11
 which-calendar -help
 which-calendar -version

OPTIONS

-help

This option displays the documentation for this script. The script then exits.

-method

 -method ymd

This option specifies the method to call to generate results. The default is 'calendar_name'.

-reform-date

 -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'.

-version

This option displays the version of this script. The script then exits.

DETAILS

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').

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.

AUTHOR

Thomas R. Wyant, III (wyant at cpan dot org)

COPYRIGHT AND LICENSE

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.