NAME
Toolforge::MixNMatch::Object::YearMonth - Mix'n'match year/month datatype.
SYNOPSIS
my
$obj
= Toolforge::MixNMatch::Object::YearMonth->new(
%params
);
my
$count
=
$obj
->count;
my
$month
=
$obj
->month;
my
$year
=
$obj
->year;
DESCRIPTION
This datatype is base class for Mix'n'match year/month.
METHODS
new
my
$obj
= Toolforge::MixNMatch::Object::YearMonth->new(
%params
);
Constructor.
Returns instance of object.
count
Count number of records for user. Parameter is required.
month
Month of statistics. Parameter is required.
year
Year of statistics. Parameter is required.
count
my
$count
=
$obj
->count;
Get count for year/month statistics.
Returns number.
month
my
$month
=
$obj
->month;
Get month of statistics.
Returns number.
year
my
$year
=
$obj
->year;
Get year of statistics.
Returns number.
ERRORS
new():
From Mo::utils::check_required():
Parameter
'count'
is required.
Parameter
'month'
is required.
Parameter
'year'
is required.
EXAMPLE
use
strict;
use
warnings;
# Object.
my
$obj
= Toolforge::MixNMatch::Object::YearMonth->new(
'count'
=> 6,
'month'
=> 1,
'year'
=> 2020,
);
# Get count for year/month statistics.
my
$count
=
$obj
->count;
# Get month of statistics.
my
$month
=
$obj
->month;
# Get year of statistics.
my
$year
=
$obj
->year;
# Print out.
"Count: $count\n"
;
"Month: $month\n"
;
"Year: $year\n"
;
# Output:
# Count: 6
# Month: 1
# Year: 2020
DEPENDENCIES
SEE ALSO
- Toolforge::MixNMatch::Object
-
Toolforge Mix'n'match tool objects.
REPOSITORY
https://github.com/michal-josef-spacek/Toolforge-MixNMatch-Object
AUTHOR
Michal Josef Špaček mailto:skim@cpan.org
LICENSE AND COPYRIGHT
© Michal Josef Špaček 2020
BSD 2-Clause License
VERSION
0.03