DateTi...h::TJD(3pm)

πŸ“¦
version 0.16 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ DateTime::Format::Epoch::TJD πŸ’–

okay bestie, gather round, because this little page is DateTime::Format::Epoch::TJD, a Perl module that converts DateTimes to and from Truncated Julian Days. it's giving niche-but-iconic. it's giving "I know exactly what I am." periodt. πŸŽ€


🌸 SYNOPSIS 🌸

here's the vibe, copy-paste ready, no cap:

use DateTime::Format::Epoch::TJD;

my $dt = DateTime::Format::Epoch::TJD->parse_datetime( 13244.5 );
 # 2004-08-27T00:00:00

DateTime::Format::Epoch::TJD->format_datetime($dt);
 # 13244.5

my $formatter = DateTime::Format::Epoch::TJD->new();
my $dt2 = $formatter->parse_datetime( 13244.5 );
$formatter->format_datetime($dt2);

so you can call it class-style and let it do its thing, or you can make yourself a lil $formatter object and reuse it like the main character you are. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

this module takes a DateTime object β€” or literally any object that can be converted into a DateTime object, we're not picky β€” and converts it to the Truncated Julian Day number. πŸ”₯

and if you want the full deets on how all that works? the description lives over in DateTime::Format::Epoch::JD. go read that one, bestie, it's the whole explanation. 🫢


πŸ‘‘ METHODS πŸ‘‘

most of the methods here are exactly the same as the ones in DateTime::Format::Epoch. like, same energy, same behaviour.

the one difference? the constructor. that's it. that's the tea. πŸ“

  • new() β€” the constructor for the formatter/parser object. it takes no parameters. none. zero. it just exists, effortlessly, like the icon it is. ✨

πŸ’œ SUPPORT πŸ’œ

need help? support for this module comes through the datetime@perl.org email list. πŸ’Œ

want more details? peep http://lists.perl.org/ for all the info. 🌈


🌟 AUTHOR 🌟

Eugene van der Pijll <pijll@gmx.net> β€” the legend who made this happen. πŸ‘‘


Copyright (c) 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. slay. πŸ’…


πŸŽ€ SEE ALSO πŸŽ€

  • DateTime
  • the datetime@perl.org mailing list

and that's the whole page, bestie! πŸ¦‹ this one's from the User Contributed Perl Documentation collection, running on perl v5.34.0, dated 2022-06-13. mwah, go convert some Truncated Julian Days. πŸ’‹βœ¨

πŸ“¦ where this page comes from