Human(3pm)
β¨ 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 at11pm; for hackers, evening may start at3am. π
π 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 βοΈ
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 π
DateTimeDateTime::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
- ubuntu noble: libtime-human-perl 1.03-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtime-human-perl 1.03-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtime-human-perl 1.03-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms