<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    Random::Day - Class for random day generation.

SYNOPSIS
     use Random::Day;

     my $obj = Random::Day-&gt;new(%params);
     my $dt = $obj-&gt;get;
     my $dt = $obj-&gt;random;
     my $dt = $obj-&gt;random_day($day);
     my $dt = $obj-&gt;random_day_month($day, $month);
     my $dt = $obj-&gt;random_day_month_year($day, $month, $year);
     my $dt = $obj-&gt;random_day_year($day, $year);
     my $dt = $obj-&gt;random_month($month);
     my $dt = $obj-&gt;random_month_year($month, $year);
     my $dt = $obj-&gt;random_year($year);

METHODS
  "new"
     my $obj = Random::Day-&gt;new(%params);

    Constructor.

    *       "day"

            Day.

            Default value is undef.

    *       "dt_from"

            DateTime object from.

            Default value is DateTime object for 1900 year.

    *       "dt_to"

            DateTime object to.

            Default value is DateTime object for 2050 year.

    *       "month"

            Month.

            Default value is undef.

    *       "year"

            Year.

            Default value is undef.

    Returns instance of object.

  "get"
     my $dt = $obj-&gt;get;

    Get random date defined by constructor parameters.

    Returns DateTime object for date.

  "random"
     my $dt = $obj-&gt;random;

    Get random date.

    Returns DateTime object for date.

  "random_day"
     my $dt = $obj-&gt;random_day($day);

    Get random date defined by day.

    Returns DateTime object for date.

  "random_day_month"
     my $dt = $obj-&gt;random_day_month($day, $month);

    Get random date defined by day and month.

    Returns DateTime object for date.

  "random_day_year"
     my $dt = $obj-&gt;random_day_year($day, $year);

    Get random date defined by day and year.

    Returns DateTime object for date.

  "random_day_month_year"
     my $dt = $obj-&gt;random_day_month_year($day, $month, $year);

    Get date defined by day, month and year.

    Returns DateTime object for date.

  "random_month"
     my $dt = $obj-&gt;random_month($month);

    Get random date defined by month.

    Returns DateTime object for date.

  "random_month_year"
     my $dt = $obj-&gt;random_month_year($month, $year);

    Get random date defined by month and year.

    Returns DateTime object for date.

  "random_year"
     my $dt = $obj-&gt;random_year($year);

    Get random date defined by year.

    Returns DateTime object for date.

ERRORS
     new():
             From Class::Utils::set_params():
                     Unknown parameter '%s'.

     random_day():
             Day cannot be a zero.
             Day isn't positive number.

     random_day_month():
             Cannot create DateTime object.
             Day cannot be a zero.
             Day isn't positive number.

     random_day_month_year():
             Begin of expected month is lesser than minimal date.
                     Expected year: %s
                     Expected month: %s
                     Expected day: %s
                     Minimal year: %s
                     Minimal month: %s
                     Minimal day: %s
             Cannot create DateTime object.
                     Error: %s
             Day cannot be a zero.
             Day isn't positive number.
             End of expected month is greater than maximal date.
                     Expected year: %s
                     Expected month: %s
                     Expected day: %s
                     Maximal year: %s
                     Maximal month: %s
                     Maximal day: %s

     random_day_year():
             Day cannot be a zero.
             Day is greater than maximal possible date.
             Day is greater than possible day.
                     Day: %s
             Day is lesser than minimal possible date.
             Day isn't positive number.
             Day not fit between start and end dates.
             Year is lesser than minimal year.
                     Expected year: %s
                     Minimal year: %s
             Year is greater than maximal year.
                     Expected year: %s
                     Maximal year: %s

     random_month():
             Cannot create DateTime object.
                     Error: %s

     random_month_year():
             Begin of expected month is lesser than minimal date.
                     Expected year: %s
                     Expected month: %s
                     Minimal year: %s
                     Minimal month: %s
             Cannot create DateTime object.
                     Error: %s
             End of expected month is greater than maximal date.
                     Expected year: %s
                     Expected month: %s
                     Maximal year: %s
                     Maximal month: %s

     random_year():
             Year is greater than maximal year.
                     Expected year: %s
                     Maximal year: %s
             Year is lesser than minimal year.
                     Expected year: %s
                     Minimal year: %s

EXAMPLE
     use strict;
     use warnings;

     use Random::Day;

     # Object.
     my $obj = Random::Day-&gt;new;

     # Get date.
     my $dt = $obj-&gt;get;

     # Print out.
     print $dt-&gt;ymd."\n";

     # Output like:
     # \d\d\d\d-\d\d-\d\d

DEPENDENCIES
    Class::Utils, DateTime, DateTime::Event::Random,
    DateTime::Event::Recurrence, English, Error::Pure.

SEE ALSO
    Data::Random
        Perl module to generate random data

    Random::Day::InTheFuture
        Class for random day generation in the future.

    Random::Day::InThePast
        Class for random day generation in the past.

REPOSITORY
    &lt;https://github.com/michal-josef-spacek/Random-Day&gt;

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

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

LICENSE AND COPYRIGHT
    ÂŠ 2013-2024 Michal Josef Ĺ&nbsp;paÄek

    BSD 2-Clause License

VERSION
    0.14

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