• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

lib/Time/H27-Sep-2012-1,180523

t/H27-Sep-2012-1,3771,026

Build.PLH A D27-Sep-20121.2 KiB3934

ChangesH A D27-Sep-20125 KiB135105

MANIFESTH A D27-Sep-2012495 3938

MANIFEST.SKIPH A D27-Sep-2012228 2019

META.jsonH A D27-Sep-20121.1 KiB5049

META.ymlH A D27-Sep-2012636 3029

Makefile.PLH A D27-Sep-2012563 1815

READMEH A D27-Sep-20123 KiB9767

SIGNATUREH A D27-Sep-20122.7 KiB6053

README

1Time::Format version 1.12
2=========================
3
4Time::Format provides a very easy way to format dates and times.  The
5formatting functions are tied to hash variables, so they can be used
6inside strings as well as in ordinary expressions.  The formatting
7codes used are meant to be easy to remember, use, and read.  They
8follow a simple, consistent pattern.  If I've done my job right, once
9you learn the codes, you should never have to refer to the
10documentation again.
11A quick-reference page is included, just in case.  ;-)
12
13Time::Format can also format DateTime objects, and strings created
14with Date::Manip.
15
16Also provided is a tied-hash interface to POSIX::strftime and
17Date::Manip::UnixDate.
18
19If the I18N::Langinfo module is available, Time::Format provides
20weekday and month names in a language appropriate for your locale.
21
22A companion module, Time::Format_XS, is also available; if it is
23installed, Time::Format will detect and use it, which will result in a
24significant speed improvement.
25
26
27EXAMPLES
28
29 $time{'Weekday Month d, yyyy'}   Thursday June 5, 2003
30 $time{'Day Mon d, yyyy'}         Thu Jun 5, 2003
31 $time{'DAY MON d, yyyy'}         THU JUN 5, 2003
32 $time{'dd/mm/yyyy'}              05/06/2003
33 $time{yymmdd}                    030605
34 $time{'yymmdd',time-86400}       030604
35
36 $time{'H:mm:ss am'}              1:02:14 pm
37 $time{'hh:mm:ss.uuuuuu'}         13:02:14.171447
38
39 $time{'yyyy/mm/dd hh:mm:ss.mmm'} 2003/06/05 13:02:14.171
40
41 $strftime{'%A %B %d, %Y'}             Thursday June 05, 2003
42 $strftime{'%A %B %d, %Y',time+86400}  Friday June 06, 2003
43
44 $manip{'%m/%d/%Y'}               06/05/2003
45 $manip{'%m/%d/%Y','yesterday'}   06/04/2003
46 $manip{'%m/%d/%Y','first monday in November 2000'}  11/06/2000
47
48There are also corresponding functions for each of these hashes, which
49you can use if you prefer (or need) a function-based interface.
50
51
52INSTALLATION
53
54To install this module, issue the following commands:
55
56   perl Build.PL
57   perl Build
58   perl Build test
59   perl Build install
60
61If you do not have Module::Build, use the old-style commands:
62
63   perl Makefile.PL
64   make
65   make test
66   make install
67
68If you're using Strawberry Perl, you may need to use 'dmake' instead of
69'make.  If you're using ActiveState Perl, you may need to use 'nmake'.
70
71
72DEPENDENCIES
73
74This module can use these other modules and libraries:
75
76  Time::Local
77  I18N::Langinfo  (optional)
78  POSIX           (optional)
79  Time::HiRes     (optional)
80  Date::Manip     (optional)
81  Time::Format_XS (optional)
82  Test::More      (used by the test suite only)
83  Module::Signature  (optional) (used by test suite only)
84
85
86COPYRIGHT AND LICENSE
87
88Eric J. Roode, roode @ cpan . org
89
90Copyright © 2003-2012 by Eric J. Roode. All Rights Reserved.
91This module is free software; See the copyright notice in the
92module source code for full details.
93
94To avoid my spam filter, please include "Perl", "module", or this
95module's name in the message's subject line, and/or GPG-sign your
96message.
97