DateTime::Posix
NAME
DateTime::Posix - Provides a DateTime object that returns posix values with fractional seconds
Note this module's routines have been incorporated into core Raku version 6.e.
SYNOPSIS
use DateTimePosixReal;
my $dt = DateTime::Posix.new: '1970-01-01T00:00:00.23Z';
say $dt.Posix; # OUTPUT: «0.23»
say $dt.posix-real; # OUTPUT: «0.23»
DESCRIPTION
DateTime::Posix is a child class of Raku's DateTime class that returns 'posix' values as fractional instead of integral seconds.
The module has two methods with slightly different names to allow some user flexibility:
method Posix($in-timezone? --> Real:D) {...}
and
method posix-real($in-timezone? --> Real:D) {...}
This module will be deprecated when Raku version 6.e is released since that version will provide the same capability for the DateTime base class as its 'posix' method will then return fractional rather than integral seconds.
AUTHOR
Tom Browder ([email protected])
COPYRIGHT and LICENSE
Copyright © 2021-2023 Tom Browder
This library is free software; you may redistribute or modify it under the Artistic License 2.0.