Debian Codegraph @

lib/TimeDate.pm

raw
1 package TimeDate;
2
3 our $VERSION = '2.35'; # VERSION: generated
4 # ABSTRACT: Date and time formatting subroutines
5
6 1;
7
8 __END__
9
10 =pod
11
12 =encoding UTF-8
13
14 =head1 NAME
15
16 TimeDate - Date and time formatting subroutines
17
18 =head1 VERSION
19
20 version 2.35
21
22 =head1 SYNOPSIS
23
24 use Date::Format;
25 use Date::Parse;
26
27 # Formatting
28 print time2str("%Y-%m-%d %T", time); # 2024-01-15 14:30:00
29 print time2str("%a %b %e %T %Y\n", time); # Mon Jan 15 14:30:00 2024
30
31 # Parsing
32 my $time = str2time("Wed, 16 Jun 94 07:29:35 CST");
33 my ($ss,$mm,$hh,$day,$month,$year,$zone) = strptime("2024-01-15T14:30:00Z");
34
35 # Multi-language support
36 use Date::Language;
37 my $lang = Date::Language->new('German');
38 print $lang->time2str("%a %b %e %T %Y\n", time);
39
40 =head1 DESCRIPTION
41
42 The TimeDate distribution provides date parsing, formatting, and timezone
43 handling for Perl.
44
45 =over 4
46
47 =item L<Date::Parse>
48
49 Parse date strings in a wide variety of formats into Unix timestamps
50 or component values.
51
52 =item L<Date::Format>
53
54 Format Unix timestamps or localtime arrays into strings using
55 C<strftime>-style conversion specifications.
56
57 =item L<Date::Language>
58
59 Format and parse dates in over 30 languages including French, German,
60 Spanish, Chinese, Russian, Arabic, and many more.
61
62 =item L<Time::Zone>
63
64 Timezone offset lookups and conversions for named timezones.
65
66 =back
67
68 =head1 SEE ALSO
69
70 L<Date::Format>, L<Date::Parse>, L<Date::Language>, L<Time::Zone>
71
72 =head1 AUTHOR
73
74 Graham <[email protected]>
75
76 =head1 COPYRIGHT AND LICENSE
77
78 This software is copyright (c) 2020 by Graham Barr.
79
80 This is free software; you can redistribute it and/or modify it under
81 the same terms as the Perl 5 programming language system itself.
82
83 =cut