The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Calendar::DatesRoles::ReturnTimeMomentObjects - Return Time::Moment objects in get_entries()

VERSION

This document describes version 0.002 of Calendar::DatesRoles::ReturnTimeMomentObjects (from Perl distribution Calendar-DatesRoles-ReturnTimeMomentObjects), released on 2020-02-17.

SYNOPSIS

 # apply the role to a Calendar::Dates::* class
 use Calendar::Dates::ID::Holiday;
 use Role::Tiny;
 Role::Tiny->apply_roles_to_package(
     'Calendar::Dates::ID::Holiday',
     'Calendar::DatesRoles::ReturnDateTimeObjects');

 # use the Calendar::Dates::* module as usual
 my $entries = Calendar::Dates::ID::Holiday->get_entries(2020);

 # now the 'date' field in each entry in $entries are Time::Moment objects
 # instead of 'YYYY-MM-DD' strings.

DESCRIPTION

This role is similar to Calendar::DatesRoles::ReturnDateTimeObjects but instead of returning DateTime objects, this role returns Time::Moment objects instead.

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/Calendar-DatesRoles-ReturnTimeMomentObjects.

SOURCE

Source repository is at https://github.com/perlancar/perl-Calendar-DatesRoles-ReturnTimeMomentObjects.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Calendar-DatesRoles-ReturnTimeMomentObjects

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

SEE ALSO

Calendar::Dates

Calendar::DatesRoles::ReturnDateTimeObjects

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2020 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.