Time::CTime(3pm)
π Time::CTime π
okay bestie, welcome to Time::CTime(3pm) β the perl manual page that formats times ala POSIX asctime, and honestly? it's giving timeless. π°οΈβ¨
β¨ NAME β¨
Time::CTime -- format times ala POSIX asctime
πΈ SYNOPSIS πΈ
look at this, it's so clean:
use Time::CTime
print ctime(time);
print asctime(localtime(time));
print strftime(template, localtime(time));
π¦ strftime conversions π¦
every single one, no skips, periodt:
%%β PERCENT%aβ day of the week abbr%Aβ day of the week%bβ month abbr%Bβ month%cβctimeformat:Sat Nov 19 21:05:57 1994%dβ DD%Dβ MM/DD/YY%eβ numeric day of the month%fβ floating point seconds (milliseconds):.314%Fβ floating point seconds (microseconds):.314159%hβ month abbr%Hβ hour, 24 hour clock, leading 0's)%Iβ hour, 12 hour clock, leading 0's)%jβ day of the year%kβ hour%lβ hour, 12 hour clock%mβ month number, starting with 1, leading 0's%Mβ minute, leading 0's%nβ NEWLINE%oβ ornate day of month --"1st","2nd","25th", etc.%pβ AM or PM%rβ time format:09:05:57 PM%Rβ time format:21:05%Sβ seconds, leading 0's%tβ TAB%Tβ time format:21:05:57%Uβ week number, Sunday as first day of week%vβ DD-Mon-Year%wβ day of the week, numerically, Sunday == 0%Wβ week number, Monday as first day of week%xβ date format:11/19/94%Xβ time format:21:05:57%yβ year (2 digits)%Yβ year (4 digits)%Zβ timezone in ascii. eg:PST
π DESCRIPTION π
This module provides routines to format dates. They correspond to the libc routines. &strftime() supports a pretty good set of conversions -- more than most C libraries. π₯
strftime supports a pretty good set of conversions.
The POSIX module has very similar functionality. You should consider using it instead if you do not have allergic reactions to system libraries. π (ngl that's the whole vibe, iykyk)
π AUTHOR π
Best Practical Solutions, LLC <modules@bestpractical.com>
π ORIGINAL AUTHOR π
David Muir Sharnoff
π GENESIS π
The starting point for this package was a posting by Paul Foley. (the origin story fr fr β¨)
π LICENSE AND COPYRIGHT π
Copyright (C) 1996-2010 David Muir Sharnoff. Copyright (C) 2011 Google, Inc. Copyright (C) 2026 Best Practical Solutions, LLC.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
this page shipped with perl v5.40.1, dated 2026-02-28 β and that's the whole manual, bestie. slay, go format some timestamps, you're the main character now π
π¦ where this page comes from
- ubuntu stonking: libtime-parsedate-perl 2026.0219-1 Β· 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