NetSDS...teTime(3pm)

πŸ“¦
version 1.045 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

πŸ’– NetSDS::Util::DateTime β€” the vibe ✨

okay bestie, so this page is from the User Contributed Perl Documentation set, and it's literally all about NetSDS::Util::DateTime, the date/time bestie you didn't know you needed. it's giving "I do one thing and I do it slayfully". let's get into it 🫢


🌸 NAME 🌸

NetSDS::Util::DateTime β€” common date/time processing routines


πŸŽ€ SYNOPSIS πŸŽ€

the whole glow-up in two lines, no cap:

use NetSDS::Util::DateTime;

print "Current date: " . date_now();

✨ DESCRIPTION ✨

so basically, this package hands you a whole set of routines for date and time processing. that's it, that's the description, and honestly? iconic. it does what it says on the tin, periodt. πŸ’…


πŸ‘‘ EXPORTED FUNCTIONS πŸ‘‘

these are the main characters. memorize them, iykyk.

  • date_now_array([TIME]) β€” gives you back an array of date items for the date you passed in. and if you didn't pass a source date? it just uses the current date, nbd. πŸ¦‹
  • date_now([TIME]) β€” returns the [given] date as a string, looking like this:
2001-12-23 14:39:53
  • date_now_iso8601([TIME]) β€” returns the date as an ISO 8601 string, like:
20011223T14:39:53Z

for the deep lore, the original page points you at:

  • date_strip(DATE) β€” trims the milliseconds off a date. bye bye, tiny numbers. πŸ’€
  • date_date(DATE) β€” trims the time part off a date. just the date, nothing else.
  • date_time(DATE) β€” trims the date part off a date. time only, bestie. ⏰
  • time_from_string($string) β€” returns a parsed date/time structure. hand it a string, get structure back. 🌈
  • date_from_string($string) β€” returns the date from a string representation.
  • date_inc([INCREMENT, [TIME]]) β€” returns the date incremented by however many seconds you gave it. time travel but make it math. ✨
  • date_inc_string([INCREMENT, [TIME]]) β€” same energy as above, but it returns the string representation of the date incremented by that number of seconds. πŸ’–

🧚 EXAMPLES 🧚

None yet

(yeah, the well is dry on this one. we move. πŸ™ˆ)


πŸ’€ BUGS πŸ’€

Unknown yet

(not a single one known, which is either a flex or a mystery. the mystery is the vibe.)


πŸ”₯ SEE ALSO πŸ”₯

  • Date::Parse
  • Date::Format

go say hi, they're the cousins. 🫢


⭐ TODO ⭐

  • Import stuff from Wono project

(manifesting that for future us ✨)


πŸ’œ AUTHOR πŸ’œ

  • Valentyn Solomko <val@pere.org.ua>
  • Michael Bochkaryov <misha@rattler.kiev.ua>

and that's the whole page, bestie!! this one was shipped as part of perl v5.36.0, dated 2022-11-20 β€” so shoutout to that era, and to you for reading all the way to the end. mwah πŸ’…πŸŽ€πŸ’–

πŸ“¦ where this page comes from