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

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

πŸ’– NAME πŸ’–

DateTime::Format::Epoch::RJD β€” the module that converts DateTimes to and from Reduced Julian Days, bestie ✨


🌸 SYNOPSIS 🌸

okay so this is the whole vibe in like five lines:

use DateTime::Format::Epoch::RJD;

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

my $formatter = DateTime::Format::Epoch::RJD->new();

my $dt2 = $formatter->parse_datetime( 53244.5 );
 # 2004-08-27T00:00:00

$formatter->format_datetime($dt2);
 # 53244.5

see how the class methods and the object methods do the exact same thing?? yeah. that's the whole point. pick whichever one matches your ~main character energy~ πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So this module can take a DateTime object β€” or honestly any object that can be converted to a DateTime object, we're not picky β€” and turn it into the Reduced Julian Day number. And it does the reverse too, no cap.

If you wanna know how this actually works under the hood, go read DateTime::Format::Epoch::JD for a description. That's where the lore lives, iykyk πŸ”₯


✨ METHODS ✨

Most of the methods are literally the same as the ones in DateTime::Format::Epoch. Like, the whole entire toolkit. The only difference is the constructor. That's it, that's the tea πŸ“

  • new() β€” the constructor for the formatter/parser object. It takes no parameters. Zero. None. She doesn't want them. Build the object and go, periodt πŸ‘‘

🫢 SUPPORT 🫢

Need help? Support for this module comes to you via the datetime@perl.org email list πŸ’Œ

If you want more info on the list situation, go peek at http://lists.perl.org/ for more details.


πŸ‘‘ AUTHOR πŸ‘‘

Eugene van der Pijll <pijll@gmx.net>


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.

fr fr, same terms as Perl itself. Read it, respect it, love it 🌈

🌟 SEE ALSO 🌟

  • DateTime
  • datetime@perl.org mailing list

and that's the whole page, bestie πŸŽ€ this was DateTi...h::RJD, shipped with perl v5.34.0, dated 2022-06-13. mwah, go convert some days πŸ’–πŸ¦‹βœ¨

πŸ“¦ where this page comes from