DateTime::Format::Genealogy - Create a DateTime object from a Genealogy Date
my $dtg = DateTime::Format::Genealogy->new();
Creates a DateTime::Format::Genealogy object.
Given a date, runs it through Genealogy::Gedcom::Date to create a DateTime object. If a date range is given, return a two element array in array context, or undef in scalar context
Returns undef if the date can't be parsed, is before AD100, is just a year or if it is an approximate date starting with "c", "ca" or "abt". Can be called as a class or object method.
my $dt = DateTime::Format::Genealogy('25 Dec 2022');
$dt = $dtg->(date => '25 Dec 2022');
date: the date to be parsed quiet: set to fail silently if there is an error with the date strict: more strictly enforce the Gedcom standard, for example don't allow long month names
Nigel Horne, <njh at bandsman.co.uk>
<njh at bandsman.co.uk>
I can't get DateTime::Format::Natural to work on dates before AD100, so this module rejects dates that old.
Genealogy::Gedcom::Date and DateTime
You can find documentation for this module with the perldoc command.
You can also look for information at:
RT: CPAN's request tracker
Copyright 2018-2023 Nigel Horne.
This program is released under the following licence: GPL2
To install DateTime::Format::Genealogy, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.