DateTi...:TAI64(3pm)
β¨ DateTi...:TAI64(3pm) β¨
okay bestie, welcome to DateTime::Format::Epoch::TAI64 β a lil User Contributed Perl Documentation moment that lives in the 3pm section of your man pages. she converts between DateTime objects and TAI64 values and honestly? she ate. π
π NAME π
DateTime::Format::Epoch::TAI64 β Convert DateTimes to/from TAI64 values
no cap, that's literally her whole job. π¦
πΈ SYNOPSIS πΈ
here's the vibe, copy-paste coded and everything:
use DateTime::Format::Epoch::TAI64;
my $dt = DateTime::Format::Epoch::TAI64
->parse_datetime( '4611686019483526367' );
# 2003-06-20T19:49:59
DateTime::Format::Epoch::TAI64->format_datetime($dt);
# 4611686019483526367
my $formatter = DateTime::Format::Epoch::TAI64->new();
$dt = $formatter->parse_datetime( '4611686019483526367' );
# 2003-06-20T19:49:59
$formatter->format_datetime($dt);
# 4611686019483526367
my $str_frmt = DateTime::Format::Epoch::TAI64->new(
format => 'string' );
$dt = $str_frmt->parse_datetime( "\x40\0\0\0\x3e\xf3\x69\x6a" );
# 2003-06-20T19:49:59
$str_frmt->format_datetime($dt);
# "\x40\0\0\0\x3e\xf3\x69\x6a"
see how she does the exact same thing in class-method form and in formatter-object form? versatile queen π
π DESCRIPTION π
so this module can convert a DateTime object β or literally any object that can be converted to a DateTime object, she's not picky β to a TAI64 value. π
and the TAI64 timescale? bestie. she covers the entire expected lifespan of the universe. at least, if you expect the universe to be closed. iconic range, fr fr. π₯
β¨ METHODS β¨
most of the methods are the same as those in DateTime::Format::Epoch. the only difference is the constructor. that's it. that's the plot twist. π
new( [format => 'string'] )β constructor of the formatter/parser object. if the optionalformatparameter is set to'string', TAI64 values will be expected to be 8 byte strings. that's the whole deal π«Ά
π«Ά SUPPORT π«Ά
need backup? support for this module is provided via the datetime@perl.org email list. see http://lists.perl.org/ for more details. the group chat is always open π
π AUTHOR π
Eugene van der Pijll <pijll@gmx.net>
π COPYRIGHT π
Copyright (c) 2003, 2004 Eugene van der Pijll. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
(legal bestie said what she said, and we respect her π)
π SEE ALSO π
DateTimedatetime@perl.orgmailing listhttp://cr.yp.to/time.html
lowkey reminder: go read DateTime too, she's the main character this module is orbiting around πΈ
and that's the whole page, bestie β sourced from perl v5.34.0, dated 2022-06-13, in the DateTi...:TAI64(3pm) era. stay converting, stay slaying π
β¨π¦
π¦ where this page comes from
- debian bookworm: libdatetime-format-epoch-perl 0.16-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libdatetime-format-epoch-perl 0.16-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libdatetime-format-epoch-perl 0.16-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libdatetime-format-epoch-perl 0.16-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libdatetime-format-epoch-perl 0.16-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms