Perl Diver 2.33
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

DateTime::Infinite

Name DateTime::Infinite
Version 1.55
Located at /usr/lib/x86_64-linux-gnu/perl5/5.34
File /usr/lib/x86_64-linux-gnu/perl5/5.34/DateTime/Infinite.pm
Is Core No
Search CPAN for this module DateTime::Infinite
Documentation DateTime::Infinite
Module Details DateTime::Infinite


NAME

DateTime::Infinite - Infinite past and future DateTime objects


VERSION

version 1.55


SYNOPSIS

  my $future = DateTime::Infinite::Future->new;
  my $past   = DateTime::Infinite::Past->new;


DESCRIPTION

This module provides two DateTime subclasses, DateTime::Infinite::Future and DateTime::Infinite::Past.

The objects are always in the ``floating'' timezone, and this cannot be changed.


METHODS

The only constructor for these two classes is the new method, as shown in the SYNOPSIS. This method takes no parameters.

All ``get'' methods in this module simply return infinity, positive or negative. If the method is expected to return a string, it returns the string representation of positive or negative infinity used by your system. For example, on my system calling $dt->year> returns a number which when printed appears either ``Inf'' or ``-Inf''.

This also applies to methods that are compound stringifications, which return the same strings even for things like $dt->ymd or $dt->iso8601

The object is not mutable, so the $dt->set, $dt->set_time_zone, and $dt->truncate methods are all do-nothing methods that simply return the object they are called with.

Obviously, the $dt->is_finite method returns false and the < $dt-is_infinite >> method returns true.


SEE ALSO

datetime@perl.org mailing list


BUGS

There seem to be lots of problems when dealing with infinite numbers on Win32. This may be a problem with this code, Perl, or Win32's IEEE math implementation. Either way, the module may not be well-behaved on Win32 operating systems.

Bugs may be submitted at https://github.com/houseabsolute/DateTime.pm/issues.

There is a mailing list available for users of this distribution, mailto:datetime@perl.org.


SOURCE

The source code repository for DateTime can be found at https://github.com/houseabsolute/DateTime.pm.


AUTHOR

Dave Rolsky <autarch@urth.org>


COPYRIGHT AND LICENSE

This software is Copyright (c) 2003 - 2021 by Dave Rolsky.

This is free software, licensed under:

  The Artistic License 2.0 (GPL Compatible)

The full text of the license can be found in the LICENSE file included with this distribution.

Perl Diver brought to you by ScriptSolutions.com © 1997- 2026