Acme-CPANModules-Parse-HumanDate

 view release on metacpan or  search on metacpan

lib/Acme/CPANModules/Parse/HumanDate.pm  view on Meta::CPAN

            module=>'DateTime::Format::Natural',
            description => <<'_',

Compared to <pm:DateTime::Format::Flexible>, this module can also parse
duration in addition to date/time, e.g.:

    2 years 3 months

And it also can extract the date expression from a longer string.

Speed-wise, I'd say the two modules are roughly comparable. For some patterns
one might be faster than the other.

_
            bench_code_template => 'DateTime::Format::Natural->new->parse_datetime(<str>)',
        },
        {
            module=>'DateTime::Format::Flexible',
            description => <<'_',

One advantage of this over <pm:DateTime::Format::Natural> is its time zone
support, e.g.:

    yesterday 8pm UTC
    yesterday 20:00 +0800
    yesterday 20:00 Asia/Jakarta

Speed-wise, I'd say the two modules are roughly comparable. For some patterns
one might be faster than the other.

_
            bench_code_template => 'DateTime::Format::Flexible->new->parse_datetime(<str>)',
        },

        {
            module => 'Date::Parse',
            description => <<'_',

This module can parse several formats, but does not really fall into "human
date/time parser" as it lacks support for casual expression like "yesterday" or
3 hours ago".

_
        },
    ],

    bench_datasets => [
        {args=>{str => 'yesterday'}},
        {args=>{str => '2 days ago'}},
        {args=>{str => '2021-09-06 20:03:00'}},
    ],
};

1;
# ABSTRACT: List of modules that parse human date/time expression

__END__

=pod

=encoding UTF-8

=head1 NAME

Acme::CPANModules::Parse::HumanDate - List of modules that parse human date/time expression

=head1 VERSION

This document describes version 0.002 of Acme::CPANModules::Parse::HumanDate (from Perl distribution Acme-CPANModules-Parse-HumanDate), released on 2023-10-31.

=head1 DESCRIPTION

=head1 ACME::CPANMODULES ENTRIES

=over

=item L<DateTime::Format::Natural>

Author: L<SCHUBIGER|https://metacpan.org/author/SCHUBIGER>

Compared to L<DateTime::Format::Flexible>, this module can also parse
duration in addition to date/time, e.g.:

 2 years 3 months

And it also can extract the date expression from a longer string.

Speed-wise, I'd say the two modules are roughly comparable. For some patterns
one might be faster than the other.


=item L<DateTime::Format::Flexible>

Author: L<THINC|https://metacpan.org/author/THINC>

One advantage of this over L<DateTime::Format::Natural> is its time zone
support, e.g.:

 yesterday 8pm UTC
 yesterday 20:00 +0800
 yesterday 20:00 Asia/Jakarta

Speed-wise, I'd say the two modules are roughly comparable. For some patterns
one might be faster than the other.


=item L<Date::Parse>

Author: L<ATOOMIC|https://metacpan.org/author/ATOOMIC>

This module can parse several formats, but does not really fall into "human
date/time parser" as it lacks support for casual expression like "yesterday" or
3 hours ago".


=back

=head1 FAQ

=head2 What is an Acme::CPANModules::* module?



( run in 1.595 second using v1.01-cache-2.11-cpan-39bf76dae61 )