std::chrono..._second_info(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’– NAME πŸ’–

hiii bestie! Welcome to the std::chrono..._second_info(3) page from the C++ Standard Libary manual (yes, that's the header's spelling, not me πŸ’€). Today's main character is std::chrono::get_leap_second_info β€” the NAME line literally says std::chrono::get_leap_second_info - std::chrono::get_leap_second_info, so we're keeping it 100% consistent, periodt.


✨ Synopsis ✨

Okay so here's the vibe check for the signature. It lives in header <chrono>, it's (since C++20), and it's templated on Duration:

Defined in header <chrono>
template< class Duration >
std::chrono::leap_second_info
get_leap_second_info( const std::chrono::utc_time<Duration>& ut );

This function obtains a std::chrono::leap_second_info. Inside that little guy, is_leap_second tells you whether ut is during a positive leap second insertion, and elapsed is the sum of leap seconds between 1 January 1970 and ut β€” respectively, in that exact order, iykyk. 🌈


🌸 Parameters 🌸

  • ut β€” the UTC time you want to examine, bestie. That's the whole parameter. Slay.

πŸŽ€ Return value πŸŽ€

A leap_second_info value specified above. That's it, that's the return β€” no extra lore, no side quest. 🫢


😭 Exceptions 😭

May throw implementation-defined exceptions. So yeah, it can throw stuff the implementation gets to decide; that's the assignment. πŸ’€


πŸ‘€ See also πŸ‘€

  • leap_second_info β€” leap second insertion information (C++20) (class)
  • leap_second β€” contains information about a leap second insertion (C++20) (class)

mwah πŸ’‹ this page came from source/version http://cppreference.com, date 2024.06.10, and the footer title is std::chrono..._second_info(3). Byeee πŸ¦‹

πŸ“¦ where this page comes from