<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    Mo::utils::Date - Mo date utilities.

SYNOPSIS
     use Mo::utils::Date qw(check_date);

     check_date($self, $key);
     check_date_order($self, $key1, $key2);

DESCRIPTION
    Utilities for checking of data values.

SUBROUTINES
  "check_date"
     check_date($self, $key);

    Check parameter defined by $key which is date and that date isn't
    greater than actual year.

    Possible dates: - YYYY-MM-DD - YYYY-M-D - YYYY-MM - YYYY-M - YYYY

    Put error if check isn't ok.

    Returns undef.

  "check_date_order"
     check_date_order($self, $key1, $key2);

    Check if date with $key1 is lesser than date with $key2.

    Put error if check isn't ok.

    Returns undef.

ERRORS
     check_date():
             Parameter '%s' for date is in bad format.
             Parameter '%s' has year greater than actual year.

     check_date_order():
             Parameter '%s' has date greater or same as parameter '%s' date.

EXAMPLE1
     use strict;
     use warnings;

     use Mo::utils::Date qw(check_date);

     my $self = {
             'key' =&gt; '2022-01-15',
     };
     check_date($self, 'key');

     # Print out.
     print "ok\n";

     # Output:
     # ok

EXAMPLE2
     use strict;
     use warnings;

     use Error::Pure;
     use Mo::utils::Date qw(check_date);

     $Error::Pure::TYPE = 'Error';

     my $self = {
             'key' =&gt; 'foo',
     };
     check_date($self, 'key');

     # Print out.
     print "ok\n";

     # Output like:
     # #Error [..Utils.pm:?] Parameter 'key' is in bad format.

DEPENDENCIES
    DateTime, Exporter, Error::Pure, Readonly.

SEE ALSO
    Mo::utils
        Mo utilities.

REPOSITORY
    &lt;https://github.com/michal-josef-spacek/Mo-utils-Date&gt;

AUTHOR
    Michal Josef Ĺ&nbsp;paÄek &lt;mailto:skim@cpan.org&gt;

    &lt;http://skim.cz&gt;

LICENSE AND COPYRIGHT
    ÂŠ Michal Josef Ĺ&nbsp;paÄek 2022-2023

    BSD 2-Clause License

VERSION
    0.01

</pre></body></html>