DateTim...pSecond(3)

✨ NAME ✨

okay bestie, welcome to the DateTim...pSecond(3) page from User Contributed Perl Documentation πŸ’–. The module is DateTime::LeapSecond β€” it's your leap seconds table and utilities era, and honestly it's giving niche-but-iconic.

πŸŽ€ VERSION πŸŽ€

version 1.65 β€” that's the version, bestie, write it down.

πŸ¦‹ SYNOPSIS πŸ¦‹

copy-paste this exactly, no cap:

        use DateTime;
        use DateTime::LeapSecond;

        print "Leap seconds between years 1990 and 2000 are ";
        print DateTime::Leapsecond::leap_seconds($utc_rd_2000)
            - DateTime::Leapsecond::leap_seconds($utc_rd_1990);

πŸ’« DESCRIPTION πŸ’«

so basically this module is used to calculate leap seconds for a given Rata Die day. It's the fallback bestie that gets used when DateTime cannot compile the XS version of this code ✨.

This library is known to be accurate for dates until Jun 2020 β€” yes, Jun 2020, put it in your calendar and respect it 😭.

And ngl, there are no leap seconds before 1972, because that's the year this system was implemented. Periodt.

  • leap_seconds($rd) β€” Returns the number of accumulated leap seconds for a given day. That's the accumulated count, okay? πŸ’…
  • extra_seconds($rd) β€” Returns the number of leap seconds for a given day, in the range -2 .. 2. Tiny range, big main character energy.
  • day_length($rd) β€” Returns the number of seconds for a given day, in the range 86398 .. 86402. So not always a clean 86400, and that's the tea πŸ“.

🌈 SEE ALSO 🌈

the icon reference: <http://hpiers.obspm.fr/eop-pc/earthor/utc/leapsecond.html> β€” go look, bestie πŸ’….

🫢 SUPPORT 🫢

Bugs may be submitted at <https://github.com/houseabsolute/DateTime.pm/issues> β€” fr fr, that's where the bugs go.

There is a mailing list available for users of this distribution, <mailto:datetime@perl.org> β€” cute, a little Perl community moment 🫢.

πŸ”₯ SOURCE πŸ”₯

The source code repository for DateTime can be found at <https://github.com/houseabsolute/DateTime.pm>. Go get the source, bestie.

πŸ‘‘ AUTHOR πŸ‘‘

Dave Rolsky <autarch@urth.org> β€” author icon, lowkey.

This software is Copyright (c) 2003 - 2023 by Dave Rolsky.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)

The full text of the license can be found in the LICENSE file included with this distribution.


alright bestie, that's the whole page. This was perl v5.42.0, dated 2024-03-08 β€” signing off with a πŸŽ€ and a πŸ’… 🫢

πŸ“¦ where this page comes from