DateTimeX-Seinfeld
view release on metacpan or search on metacpan
lib/DateTimeX/Seinfeld.pm view on Meta::CPAN
this, it is not necessary that C<last> and C<longest> reference the
same hash if they are the same chain. If they have the same
C<start_period>, then C<find_chains> will link them automatically (by
setting S<C<< $info->{longest} = $info->{last} >>>).
When continuing a search, the C<start_date> is ignored. Instead, the
search resumes from C<< $info->{last}{end_period} >>.
The only fields that you I<must> supply in order to continue a calculation
are C<start_period>, C<end_period>, & C<length> in C<< $info->{last} >>,
and C<start_period> & C<length> in C<< $info->{longest} >>.
However, any field that you don't supply can't be expected to hold
valid data afterwards.
When continuing a calculation, C<@events> should not include any dates
before C<< $info->{last}{end_event} >>. If you disregard this rule,
any events less than C<< $info->{last}{end_period} >> are considered
to have occurred in the previous period (even if they actually
occurred in an even earlier period).
=head2 period_containing
$start = $seinfeld->period_containing( $date );
Returns the DateTime at which the period containing C<$date> (a
DateTime) begins.
Note: If C<$date> occurs during a period that is skipped, then
C<$start> will be greater than C<$date>. Otherwise, C<$start> is
always less than or equal to C<$date>.
=head1 DIAGNOSTICS
=over
=item C<start_date (%s) must be before first date (%s)>
You must not pass an event to C<find_chains> that occurs before the
C<start_date> of the first period.
=back
=head1 CONFIGURATION AND ENVIRONMENT
DateTimeX::Seinfeld requires no configuration files or environment variables.
=head1 DEPENDENCIES
DateTimeX::Seinfeld requires
L<Moose>,
L<namespace::autoclean>,
L<MooseX::Types::DateTime>,
L<MooseX::Types::Moose>,
and Perl 5.10.0 or later.
=head1 INCOMPATIBILITIES
None reported.
=head1 BUGS AND LIMITATIONS
No bugs have been reported.
=head1 AUTHOR
Christopher J. Madsen S<C<< <perl AT cjmweb.net> >>>
Please report any bugs or feature requests
to S<C<< <bug-DateTimeX-Seinfeld AT rt.cpan.org> >>>
or through the web interface at
L<< http://rt.cpan.org/Public/Bug/Report.html?Queue=DateTimeX-Seinfeld >>.
You can follow or contribute to DateTimeX-Seinfeld's development at
L<< https://github.com/madsen/datetimex-seinfeld >>.
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2014 by Christopher J. Madsen.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=head1 DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE
LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
=cut
( run in 1.938 second using v1.01-cache-2.11-cpan-39bf76dae61 )