Human(3pm)

πŸ“¦
version 1.03 Β· 4 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

✨ Human(3pm) ✨

ok so this is the manual page for Time::Human, from the User Contributed Perl Documentation crew πŸ’–


🌸 NAME 🌸

Time::Human β€” it takes your boring localtime() format and turns it into a whole "speaking clock" vibe, like a bestie telling you the time instead of a robot πŸ•πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

  use Time::Human;
  print "The time is now ", humanize(localtime());

like... that's it. that's the whole thing. slay ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

So basically this module gives you a "vague" rendering of the time as actual natural language?? Like not 15:47:22, but words. It was originally made for text-to-speech things and other speech-based interfaces, so if you're building something that talks out loud, this is literally your girl πŸ—£οΈπŸ’–

It's fully internationalised, no cap. If you go peek at the code you'll find a global variable called %Time::Human::templates, and you can just... fill it in for other languages. Your language, bestie, your rules 🌈

And like β€” if you do multinationalise it, the author is asking super nicely for you to send templates for other languages so they can go into future releases πŸ₯ΊπŸ«Ά so yeah. contribute. it's giving community.

You can set the default language through the global variable $Time::Human::Language 🌍

Also!! $Time::Human::Evening and $Time::Human::Night are the globals that decide the hours at which afternoon turns to evening and evening turns to night in your culture. Which is so real because time is fake and culture-dependent 😌

For instance, Greeks may want evening to start at 11pm; for hackers, evening may start at 3am. πŸ’€

πŸ’œ USAGE πŸ’œ

✨ Import Parameters ✨

This module accepts no arguments to its import method.

(ok and actually β€” it doesn't even have an import "method". so jot that down πŸ™ˆ)

✨ Exports ✨

This module exports a single symbol: the humanize function πŸ’«


πŸ‘‘ CREDITS πŸ‘‘

  • Simon Cozens (SIMON) for originally creating this module πŸ†
  • Ricardo SIGNES (RJBS) for being inhumanly patient in waiting for the author to apply a one line whitespace trimming patch 😭 (one. line. bestie. the patience is iconic)
  • Everyone at the DateTime "Asylum" 🩺✨ (affectionate)

πŸ“¬ SUPPORT πŸ“¬

Support for this module is provided via the datetime@perl.org email list.

See http://lists.perl.org/ for more details πŸ’Œ


🌟 AUTHOR 🌟

Simon Cozens, simon@cpan.org


πŸ’– CURRENT MAINTAINER πŸ’–

Joshua Hoblitt, jhoblitt@cpan.org


Copyright (C) 2006-2007 Joshua Hoblitt. All rights reserved.

Copyright (C) 2001-2002(???) Simon Cozens.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself πŸ”“

The full text of the license can be found in the LICENSE file included with this module, or in perlartistic and perlgpl Pods as supplied with Perl 5.8.1 and later πŸ“œ


πŸ”­ SEE ALSO πŸ”­

  • DateTime
  • DateTime::Format::Human

and that's the whole page bestie πŸ’… that footer energy? this shipped as part of perl v5.36.0, dated 2022-10-21, under the manual page Human(3pm). periodt πŸŽ€βœ¨

πŸ“¦ where this page comes from