DateTime::Infinite(3) User Contributed Perl Documentation DateTime::Infinite(3)

# [SYNOPSIS](#SYNOPSIS)

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

# [DESCRIPTION](#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.

# [BUGS](#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.

# [METHODS](#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-&gt;year"&gt; 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-&gt;ymd" or "$dt-&gt;iso8601"

The object is not mutable, so the "$dt-&gt;set", "$dt-&gt;set\_time\_zone", and "$dt-&gt;truncate" methods are all do-nothing methods that simply return the object they are called with.

Obviously, the "$dt-&gt;is\_finite" method returns false and the "$dt-&gt;is\_infinite" method returns true.

# [SEE ALSO](#SEE_ALSO)

datetime@perl.org mailing list

2026-10-26 perl v5.44.0

---

Document: DateTime::Infinite(3pm) from perl-datetime 1.67-r2 (Chainguard OS)
Source: https://github.com/houseabsolute/DateTime.pm
