.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Time::CTime 3" .TH Time::CTime 3 2023-07-26 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Time::CTime \-\- format times ala POSIX asctime .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 4 \& use Time::CTime \& print ctime(time); \& print asctime(localtime(time)); \& print strftime(template, localtime(time)); .Ve .SS "strftime conversions" .IX Subsection "strftime conversions" .Vb 10 \& %% PERCENT \& %a day of the week abbr \& %A day of the week \& %b month abbr \& %B month \& %c ctime format: 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\*(Aqs) \& %I hour, 12 hour clock, leading 0\*(Aqs) \& %j day of the year \& %k hour \& %l hour, 12 hour clock \& %m month number, starting with 1, leading 0\*(Aqs \& %M minute, leading 0\*(Aqs \& %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\*(Aqs \& %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 .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This module provides routines to format dates. They correspond to the libc routines. &\fBstrftime()\fR supports a pretty good set of coversions \-\- more than most C libraries. .PP strftime supports a pretty good set of conversions. .PP The POSIX module has very similar functionality. You should consider using it instead if you do not have allergic reactions to system libraries. .SH GENESIS .IX Header "GENESIS" Written by David Muir Sharnoff . .PP The starting point for this package was a posting by Paul Foley .SH LICENSE .IX Header "LICENSE" Copyright (C) 1996\-2010 David Muir Sharnoff. Copyright (C) 2011 Google, Inc. License hereby granted for anyone to use, modify or redistribute this module at their own risk. Please feed useful changes back to cpan@dave.sharnoff.org.