DateTime::Infinite(3pm)

DateTime::Infinite3pm

Infinite past and future datetime objects

Usage

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

Version

version 1.67

Overview

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.

Source

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

Releases

12 releases since Debian 3.1 (Sarge); the text changed 11 times.

  1. 3.1
  2. 4.0
  3. 5.0
  4. 6.0
  5. 7
  6. 8
  7. 9
  8. 10
  9. 11
  10. 12
  11. 13
  12. Arch

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:[email protected]>.

Author

Dave Rolsky <[email protected]>

From perl-datetime 1.67-2 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.