Codebase list libtimedate-perl / upstream/1.2000
[svn-upgrade] Integrating new upstream version, timedate (1.2000) Jonathan Yu 14 years ago
8 changed file(s) with 41 addition(s) and 23 deletion(s). Raw diff Collapse all Expand all
0 1.20 -- Sat Dec 12 06:38:14 CST 2009
1
2 * Typo => s/timezome/timezone/ [yanick]
3 * RT#52387 Fix %s formating to use timelocal when no timezone is given
4 * RT#51664 fix str2time('16 Oct 09') to not give a negative result
5
06 1.19 -- Fri Sep 25 13:59:41 CDT 2009
17
28 * Replace Date::Language::Hungarian with version from CPAN by Lee Goddard
3535 lib/Date/Parse.pm
3636 lib/Time/Zone.pm
3737 Makefile.PL
38 MANIFEST
38 MANIFEST This list of files
3939 README
4040 t/cpanrt.t
4141 t/date.t
00 --- #YAML:1.0
11 name: TimeDate
2 version: 1.19
2 version: 1.20
33 abstract: ~
44 author:
55 - Graham Barr <gbarr@pobox.com>
88 WriteMakefile(
99 NAME => 'TimeDate',
1010 AUTHOR => 'Graham Barr <gbarr@pobox.com>',
11 VERSION => '1.19',
11 VERSION => '1.20',
1212 (eval { ExtUtils::MakeMaker->VERSION(6.21) } ? (LICENSE => 'perl') : ()),
1313 ( eval { ExtUtils::MakeMaker->VERSION(6.46) } ? (
1414 META_MERGE => {
1313 -----BEGIN PGP SIGNED MESSAGE-----
1414 Hash: SHA1
1515
16 SHA1 1cfbd5694da3169c17b3648846c9f5e7223f4d26 ChangeLog
17 SHA1 205981f550ad232f94d59d8eb79c5e6ecbe8f48d MANIFEST
18 SHA1 8e0c2e200e666305e860ca20930ddf7f285825f3 META.yml
19 SHA1 6f6d8f3971192224df63d9864dc341078c15286d Makefile.PL
16 SHA1 036da21b212a902ecb9d195565bbcd4c51bccecc ChangeLog
17 SHA1 efb2a90cd095d97ec148e6263fb921f560cfffb5 MANIFEST
18 SHA1 4efed966d43e74a6f53ef2bcdbfc4de05b92035f META.yml
19 SHA1 e111caf8b7da35935fa7004a17045cab55278445 Makefile.PL
2020 SHA1 80cff3b1f65e7df95eaa1a992b688c2c5e1d2b6e README
21 SHA1 6823bd5e2e3cac12b7b9870d9840f4606f3eb422 lib/Date/Format.pm
21 SHA1 5ca10e18e888daf0883de553219f42ca2422763f lib/Date/Format.pm
2222 SHA1 08342e72298e839f21236dff7555f2505f928d32 lib/Date/Language.pm
2323 SHA1 50703aeade60a04398517416d30a2d8918c95578 lib/Date/Language/Afar.pm
2424 SHA1 f9450ca0047510a4102c32cc4e20a435cdd85b31 lib/Date/Language/Amharic.pm
5252 SHA1 20fc6beb32657ca147719f713ff816bbb696da20 lib/Date/Language/TigrinyaEritrean.pm
5353 SHA1 30f77a43a000f2ce3d22b1b633261a20289025aa lib/Date/Language/TigrinyaEthiopian.pm
5454 SHA1 54288741c52b09ee92b0487848df74a08cdc3b9e lib/Date/Language/Turkish.pm
55 SHA1 dbcc4a151b1c558b32ed61fa7ee98e0fb47b9d7f lib/Date/Parse.pm
55 SHA1 b10ec48bd01b73638e4c6dce3f554e4c77267b6c lib/Date/Parse.pm
5656 SHA1 394c7d372c25107ba5151ceca44c0599188907c7 lib/Time/Zone.pm
57 SHA1 62465108c0d5fc14e08ae41e2f963c4d9074b1d6 t/cpanrt.t
57 SHA1 ee65cf5b634d907c4cc2d414e49c06175461e6ac t/cpanrt.t
5858 SHA1 7b16580497a96a4bc551b87b8b97ec89331e81f8 t/date.t
5959 SHA1 bf6f4a7c599485ab11779c99fc821378e547d26d t/format.t
6060 SHA1 acef4dd152cd391a3e7a7945c8405a50d965f335 t/getdate.t
6161 SHA1 501dcb487e33f6b2d4577ef2e6e5f67f038d3c04 t/lang.t
6262 -----BEGIN PGP SIGNATURE-----
63 Version: GnuPG v1.4.9 (Darwin)
63 Version: GnuPG v1.4.10 (Darwin)
6464
65 iEYEARECAAYFAkq9E3QACgkQR0BL4gbYw3QQYACfQg56MxwRuw6XPWOfpumki+CN
66 CWAAn1WM3GKmUyJdxf9g95yvZl552Tg0
67 =2lbe
65 iEYEARECAAYFAksjjt4ACgkQR0BL4gbYw3RCKgCePxf2QrH/3uvOofKewESV0zto
66 t+sAnA5dGEi945ziAfAkLyFUhIMWnm7U
67 =GqfE
6868 -----END PGP SIGNATURE-----
77 use vars qw(@EXPORT @ISA $VERSION);
88 require Exporter;
99
10 $VERSION = "2.23";
10 $VERSION = "2.24";
1111 @ISA = qw(Exporter);
1212 @EXPORT = qw(time2str strftime ctime asctime);
1313
214214 sub format_M { sprintf("%02d",$_[0]->[1]) }
215215 sub format_q { sprintf("%01d",int($_[0]->[4] / 3) + 1) }
216216 sub format_s {
217 $epoch = timegm(@{$_[0]}[0..5])
217 $epoch = timelocal(@{$_[0]}[0..5])
218218 unless defined $epoch;
219219 sprintf("%d",$epoch)
220220 }
1414 @ISA = qw(Exporter);
1515 @EXPORT = qw(&strtotime &str2time &strptime);
1616
17 $VERSION = "2.29";
17 $VERSION = "2.30";
1818
1919 my %month = (
2020 january => 0,
260260 if (defined $zone) {
261261 $result = eval {
262262 local $SIG{__DIE__} = sub {}; # Ick!
263 timegm($ss,$mm,$hh,$day,$month,$year+1900);
263 timegm($ss,$mm,$hh,$day,$month,$year);
264264 };
265265 return undef
266266 if !defined $result
272272 else {
273273 $result = eval {
274274 local $SIG{__DIE__} = sub {}; # Ick!
275 timelocal($ss,$mm,$hh,$day,$month,$year+1900);
275 timelocal($ss,$mm,$hh,$day,$month,$year);
276276 };
277277 return undef
278278 if !defined $result
311311
312312 C<str2time> parses C<DATE> and returns a unix time value, or undef upon failure.
313313 C<ZONE>, if given, specifies the timezone to assume when parsing if the
314 date string does not specify a timezome.
314 date string does not specify a timezone.
315315
316316 =item strptime(DATE [, ZONE])
317317
0 use Date::Format qw(time2str);
1 use Date::Parse qw(strptime);
0 use Date::Format qw(time2str strftime);
1 use Date::Parse qw(strptime str2time);
22
3 print "1..5\n";
3 print "1..8\n";
44
55 my $i = 1;
66
3939 print "ok ", $i++, "\n";
4040 }
4141
42 { # [rt.cpan.org #52387] seconds since the Epoch, UCT
43 my $time = time;
44 my @lt = localtime(time);
45 print "not " unless strftime("%s", @lt) eq $time;
46 print "ok ", $i++, "\n";
47 print "not " unless time2str("%s",$time) eq $time;
48 print "ok ", $i++, "\n";
49 }
4250
51 { # [rt.cpan.org #51664] Change in str2time behaviour between 1.16 and 1.19
52 print "not " if str2time('16 Oct 09') < 0;
53 print "ok ", $i++, "\n";
54 }