diff --git a/Build.PL b/Build.PL index 682497c..68d5caf 100644 --- a/Build.PL +++ b/Build.PL @@ -22,7 +22,7 @@ my %module_build_args = ( 'Dave Rolsky ' ], 'dist_name' => 'DateTime', - 'dist_version' => '0.66', + 'dist_version' => '0.67', 'license' => 'artistic_2', 'module_name' => 'DateTime', 'recommends' => {}, @@ -30,9 +30,11 @@ my %module_build_args = ( 'requires' => { 'DateTime::Locale' => '0.41', 'DateTime::TimeZone' => '1.09', + 'Math::Round' => '0', 'Params::Validate' => '0.76', 'Scalar::Util' => '0', - 'Time::Local' => '1.04' + 'Time::Local' => '1.04', + 'perl' => 'v5.8.1' }, 'script_files' => [] ); diff --git a/Changes b/Changes index a9abc24..6bbb6ca 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,21 @@ +0.67 2011-04-24 + +- The %N strftime specifier simply truncated nanoseconds, rather than rounding + them. Reported by Michael R. Davis. RT #66744. + +- The %U strftime specifier was off by one in years where January 1st was a + Sunday. Patch by Christian Hansen. RT #67631. + +- The %W strftime specifier was off by one in years where January 1st was a + Sunday or Monday. Patch by Christian Hansen. RT #67631. + +- Some small optimizations from Christian Hansen. The biggest impact is for + calculating week_of_month, week_number, and week_year. + +- This distro now requires Perl 5.8.1+ (it implicitly did this anyway now that + Params::Validate is 5.8.1+). + + 0.66 2010-11-26 - A bunch of documentation cleanup. No code changes. diff --git a/LICENSE b/LICENSE index 4cdf25b..c2a52d8 100644 --- a/LICENSE +++ b/LICENSE @@ -1,8 +1,8 @@ -This software is Copyright (c) 2010 by Dave Rolsky. +This software is Copyright (c) 2011 by Dave Rolsky. This is free software, licensed under: - The Artistic License 2.0 + The Artistic License 2.0 (GPL Compatible) The Artistic License 2.0 diff --git a/MANIFEST b/MANIFEST index a342571..d50f211 100644 --- a/MANIFEST +++ b/MANIFEST @@ -68,12 +68,12 @@ t/42duration-class.t t/43new-params.t t/44set-formatter.t t/author-test-all-my-deps.t +t/release-cpan-changes.t t/release-eol.t -t/release-kwalitee.t t/release-no-tabs.t t/release-pod-coverage.t t/release-pod-spell.t -t/release-pod.t +t/release-pod-syntax.t t/release-pp-00load.t t/release-pp-01sanity.t t/release-pp-02last-day.t diff --git a/META.json b/META.json index 7cc669b..278f8d6 100644 --- a/META.json +++ b/META.json @@ -4,7 +4,7 @@ "Dave Rolsky " ], "dynamic_config" : 0, - "generated_by" : "Dist::Zilla version 4.102345, CPAN::Meta::Converter version 2.101670", + "generated_by" : "Dist::Zilla version 4.200004, CPAN::Meta::Converter version 2.110580", "license" : [ "artistic_2" ], @@ -32,9 +32,11 @@ "requires" : { "DateTime::Locale" : "0.41", "DateTime::TimeZone" : "1.09", + "Math::Round" : 0, "Params::Validate" : "0.76", "Scalar::Util" : 0, - "Time::Local" : "1.04" + "Time::Local" : "1.04", + "perl" : "v5.8.1" } } }, @@ -50,6 +52,6 @@ "web" : "http://hg.urth.org/hg/DateTime.pm" } }, - "version" : "0.66" + "version" : "0.67" } diff --git a/META.yml b/META.yml index 090d54b..26ac7f0 100644 --- a/META.yml +++ b/META.yml @@ -11,7 +11,7 @@ build_requires: configure_requires: Module::Build: 0.3601 dynamic_config: 0 -generated_by: 'Dist::Zilla version 4.102345, CPAN::Meta::Converter version 2.101670' +generated_by: 'Dist::Zilla version 4.200004, CPAN::Meta::Converter version 2.110580' license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -20,10 +20,12 @@ name: DateTime requires: DateTime::Locale: 0.41 DateTime::TimeZone: 1.09 + Math::Round: 0 Params::Validate: 0.76 Scalar::Util: 0 Time::Local: 1.04 + perl: v5.8.1 resources: bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=DateTime repository: http://hg.urth.org/hg/DateTime.pm -version: 0.66 +version: 0.67 diff --git a/README b/README index 224c47c..b5a81a8 100644 --- a/README +++ b/README @@ -1,14 +1,14 @@ This archive contains the distribution DateTime, -version 0.66: +version 0.67: A date and time object -This software is Copyright (c) 2010 by Dave Rolsky. +This software is Copyright (c) 2011 by Dave Rolsky. This is free software, licensed under: - The Artistic License 2.0 + The Artistic License 2.0 (GPL Compatible) diff --git a/SIGNATURE b/SIGNATURE index fd0265b..e17dbac 100644 --- a/SIGNATURE +++ b/SIGNATURE @@ -1,5 +1,5 @@ This file contains message digests of all files listed in MANIFEST, -signed via the Module::Signature module, version 0.61. +signed via the Module::Signature module, version 0.66. To verify the content in this distribution, first make sure you have Module::Signature installed, then type: @@ -14,29 +14,29 @@ not run its Makefile.PL or Build.PL. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -SHA1 128b1d1d73d46ba85bc61291fa266bd00a10a369 Build.PL +SHA1 e1b2af53081fa772a3b958aac091db285485b807 Build.PL SHA1 c951898b770a16da2897d908ab6f9f72057bd570 CREDITS -SHA1 72a90b8bb2a259be79d6d3837e1e5d28272d1186 Changes +SHA1 a0af2607c17cb6f6141dfe06a621a85b602f1f49 Changes SHA1 c5f2b8434452ecd4c943c59ae2a95abb9d75332d INSTALL -SHA1 23c628b4a8a36738405ccdacaeb912d2e727b4c0 LICENSE -SHA1 3252f91ad8fe5bfe6076b9c42bf4bc6854225da9 MANIFEST -SHA1 6d513da55d19999b13d7ec3701409fbd1103e4a6 META.json -SHA1 7650dad68cd9dbc38c8a3e78055b1a001609b4df META.yml -SHA1 2186bf6b145155bced461534f021bd49cd1f3606 README +SHA1 c715d20265d2931c7564fc64abfdc4f8ff33e297 LICENSE +SHA1 3bf9718f28d341b3df7d8b35a030b3b3e18eafed MANIFEST +SHA1 e952a2a6e511bd0e2b7322db0ecb6a52f6f6e0f1 META.json +SHA1 b62e7a95a8fb321ac29fe096c47352b166f73cab META.yml +SHA1 24ab8252bbeb1746cfae76f32195d0fcf4ab187d README SHA1 bfc70fbe8fa29484452bea8c2ed4afd55218f2c2 TODO SHA1 b67b906c9fbaab9ccac635d623cb4e6064feb8f0 c/leap_seconds.h SHA1 4cd12d2a050ab038e519bd1391f77855ba4b24ac c/ppport.h -SHA1 9ff8b8002073c98185c073a7ec01e7f43be83668 dist.ini +SHA1 c97564e2f5cc9b6e24e315be1c73a717a3b785f0 dist.ini SHA1 2d1f339f1a2ceb22c2657d7c21983f69bc7456e3 inc/MyModuleBuild.pm SHA1 ad083d04f765963b707dab9d566bf17e92fa51e9 leaptab.txt -SHA1 ced41944ffccd074b45b399f55e9d31a62ef03ae lib/DateTime.pm +SHA1 a9348ae5a159a9ec0924208bb8cb9566be5a7389 lib/DateTime.pm SHA1 d2c3464984dc7567d8ef825a80fc4d5ed3602d0a lib/DateTime.xs -SHA1 b4db4a440699d8c14f2adf838b99a1c7c8605449 lib/DateTime/Duration.pm -SHA1 8c67857e2ecad216da581879913c7dc44ab75d64 lib/DateTime/Helpers.pm -SHA1 020ae2f197cd51ba63391ca9713d538756325e77 lib/DateTime/Infinite.pm -SHA1 660668edad65755d2744eaffa25f34c5400cc1f2 lib/DateTime/LeapSecond.pm -SHA1 afdeee24076778067db93bb443a5e296f3646417 lib/DateTimePP.pm -SHA1 da22bd9c7cb8983b97f5478a5a1ad3357d0dd48c lib/DateTimePPExtra.pm +SHA1 3fb1ebd3485d9caf7ba7fe669d210f6dbff0d3a5 lib/DateTime/Duration.pm +SHA1 566f3d6df4c2a5705695b96b48f2ab72f14d7852 lib/DateTime/Helpers.pm +SHA1 3e6a81cbb3e458af54f13c14f69724e7d563c378 lib/DateTime/Infinite.pm +SHA1 60b39dce1c847e49f4a09a7e6770ff373863e62b lib/DateTime/LeapSecond.pm +SHA1 b67d541a99a564182442256093a2cd9a0796a6f2 lib/DateTimePP.pm +SHA1 e0501809109a25f5f30b68715e5e9d50422535f6 lib/DateTimePPExtra.pm SHA1 b7d12ae6a374c314afcf6ee289a1ae309d8a8563 t/00load.t SHA1 53ac3a3da64401a86b06ed6dbcc1af01ba7741dd t/01sanity.t SHA1 1ced0f94d405f32f687b5a86c245774fabb44b40 t/02last-day.t @@ -49,7 +49,7 @@ SHA1 53203ac23b6ea91a678748b7c7143bba1189ed25 t/09greg.t SHA1 2b6582dbdcc95a3a8c928da233d3c9cefa8193ef t/10subtract.t SHA1 26ba2f29d7b049dd1f58cdd25f91d919263b9008 t/11duration.t SHA1 9c04679ba62e41c5c0d28fbf5dbc94536827fe65 t/12week.t -SHA1 6a185920eb32589d8859316b3d21f778db7fe222 t/13strftime.t +SHA1 4587a2cc332695f23c8ddf53727435c6e40e5b7d t/13strftime.t SHA1 5a8e5f135d1735c25981b73ce06fd68296372405 t/14locale.t SHA1 31d4392975a4d13e6c10145b9e63b4c45350c148 t/15jd.t SHA1 78fd6143e323413681f73d94f68382c257f7b67e t/16truncate.t @@ -83,60 +83,60 @@ SHA1 f1b64f5240f5516555b7c8e9c5542e92379ba67d t/42duration-class.t SHA1 9f788a8482e8853ae20dd302ce409eca4841db32 t/43new-params.t SHA1 dd4e63c7e098d7e3f7393ada6bbdb6c0455d120f t/44set-formatter.t SHA1 d1f2947de88938642616f3813230dff1df9c4ecd t/author-test-all-my-deps.t +SHA1 99fd7a50c65d07b8dcb369a7d2ea75860944ea1d t/release-cpan-changes.t SHA1 a032c41ef6887fab1b900669c2d304fab46680e2 t/release-eol.t -SHA1 961a1e2c92d836c8cad2d34b784cbc75345dec63 t/release-kwalitee.t SHA1 455d1dd1867212a665ad5ea4126b572411de300c t/release-no-tabs.t SHA1 608449cdb4ab7622c69342cd00037d07cf6037d7 t/release-pod-coverage.t SHA1 b04246cf2ebc03dde8c0a547285e1d58719886f2 t/release-pod-spell.t -SHA1 0bf5c7d045bcd17b72749ea8d57bfc2435913095 t/release-pod.t -SHA1 ec43fd5da3960d2f3b2791382188eeb31393ae7a t/release-pp-00load.t -SHA1 3d077519de5e9e4d7c1af922a5004da861270ec2 t/release-pp-01sanity.t -SHA1 64e4f23202fdb46ba0a21276e0b1c4981c4dd5a8 t/release-pp-02last-day.t -SHA1 47a5b81303eb86e015a53d4aa344fb22b8773785 t/release-pp-03components.t -SHA1 f0a12a7b246941a19d7e9c4d555f6c35d6de2413 t/release-pp-04epoch.t -SHA1 dfd98f40ccb304d5e2d1745f5153f94cc7af2b7b t/release-pp-05set.t -SHA1 f08e942870be919516dd61b42674ccf4ccb0252f t/release-pp-06add.t -SHA1 12ffff16260fb303d1fd30425567fc66e2f364a6 t/release-pp-07compare.t -SHA1 c7ab21e7decc63bfec66f8db80e07e7ebc8083d2 t/release-pp-09greg.t -SHA1 0ab7ca580154d232676e5baeef77bb014e83e147 t/release-pp-10subtract.t -SHA1 b3625c7fb928d852e453a0a9d8df1ce1242912d8 t/release-pp-11duration.t -SHA1 7e22acd97a7201792a1f2edb816a6120562b7d59 t/release-pp-12week.t -SHA1 17d02910e2e7bb432309defe92bb36508b992849 t/release-pp-13strftime.t -SHA1 bc791aaffbe47519f3fe18235d6c3671d4bc22b5 t/release-pp-14locale.t -SHA1 ca848305537c4a081dd0bf3735e6108e5b2de745 t/release-pp-15jd.t -SHA1 e9083e7a9a370511369392560e5bec2bb59dcd57 t/release-pp-16truncate.t -SHA1 c911147345905ed342f38c54c0b7f28c3ae6e329 t/release-pp-17set-return.t -SHA1 910ab3b51069fc690ca34c73c387a8f9d0371e53 t/release-pp-18today.t -SHA1 1677dcda1e4fe8f0961628e8deaf27d97c48eb41 t/release-pp-19leap-second.t -SHA1 5f1a6cbefe39d66fc2a5b0cecaa9f4766aae42b5 t/release-pp-20infinite.t -SHA1 f0c27526690e768a6525e8ee5ffa8109afaf6cc6 t/release-pp-21bad-params.t -SHA1 e61f720c3082836c8f2ed70270d229a7ae50f177 t/release-pp-22from-doy.t -SHA1 0cb9069bdd649cd50c044e16f66c7296609bee34 t/release-pp-23storable.t -SHA1 136ad91199628817b3e99d1af0208a1d478dd4dc t/release-pp-24from-object.t -SHA1 2039227f68f4c6ff52057e3f0b4d62c3b5787b3b t/release-pp-25add-subtract.t -SHA1 700a929cfb728e81291ae5069ce53e50d9797a94 t/release-pp-27delta.t -SHA1 d75780d8c371e1c4e9c299e58fea80eb064b85b7 t/release-pp-28dow.t -SHA1 67a27b827224a6da111ea98f32abc1e6a7c701ef t/release-pp-29overload.t -SHA1 d615be9ddb60746b16f4c66d8087b83182602436 t/release-pp-30future-tz.t -SHA1 9600dca43a6ec23fedccf41f0e05a6a4a294c49e t/release-pp-31formatter.t -SHA1 4ad4d41cfaa61fdaa5c93eae7b6cc97fa1f3cb66 t/release-pp-32leap-second2.t -SHA1 9c48de75fb6ad5534c462ed151f98a0c71c960fb t/release-pp-33seconds-offset.t -SHA1 a3fe25e5398614522f67ac9de05d8bee0dd8ccb6 t/release-pp-34set-tz.t -SHA1 dbe2a70ed8cfdf1fb21c9edc31d076686eea97f1 t/release-pp-35rd-values.t -SHA1 981038ba664ebfd1d5ff0d497f4602186c42169f t/release-pp-36invalid-local.t -SHA1 881f47d81f4f6b4346815d8fb766ed5871924bdc t/release-pp-36invalid_local.t -SHA1 220c5c57d115d05a5b22a7acc58874d5a5aa672b t/release-pp-37local-add.t -SHA1 4329a876d661b7d502b28fdde101bd17f59b462c t/release-pp-38local-subtract.t -SHA1 373e351708783b540380192df71ba2dc24e4c449 t/release-pp-40leap-years.t -SHA1 dc43d38ef29cb2a541350e5f4e93f58b04f2bd1b t/release-pp-41cldr-format.t -SHA1 9f032607aeeb8d36818b2949252ea04a4cd5a839 t/release-pp-42duration-class.t -SHA1 bcc9c6d9eff526dfa4cdef7eb22f14ef1e326cf8 t/release-pp-43new-params.t -SHA1 d94db4079dbd1b1e93cdcbcbff41308fe5fb79fe t/release-pp-44set-formatter.t +SHA1 b30cbdfaf935017c4568c0c91b242438cb87786e t/release-pod-syntax.t +SHA1 d0478a2d90fff8590d2611f914fce2ed687199a2 t/release-pp-00load.t +SHA1 42e8078342ba876acea79905c69f2f9a5e798b30 t/release-pp-01sanity.t +SHA1 66ca69fd851582ab645de0360ded452a5fa6effe t/release-pp-02last-day.t +SHA1 35a3ba83694d953283851421b5d65b4b7ec31838 t/release-pp-03components.t +SHA1 0e98a34c22b6486ce6ebd9b3ca714cec7062c03b t/release-pp-04epoch.t +SHA1 d49b5489158a3836c956d7c8609ef0b560a0e3f2 t/release-pp-05set.t +SHA1 43dda21232a242beea0fb4fa140a726ea53b3f41 t/release-pp-06add.t +SHA1 5425a3df5056f36b53865ee3e7c8d7c3a12e5b99 t/release-pp-07compare.t +SHA1 8a8539c137e4c1ba1f020c485ab744b3265165e0 t/release-pp-09greg.t +SHA1 ba80cd8fcdb2aa0cedb2a057053d19667e9471aa t/release-pp-10subtract.t +SHA1 4773be589e9b5406377527e9525d8450e04d5e73 t/release-pp-11duration.t +SHA1 e69c9d656b6462e7d52bba196ce6f6e878798a59 t/release-pp-12week.t +SHA1 fc0256619715c08c278a49c1619840e4533720e9 t/release-pp-13strftime.t +SHA1 b7e108865965a5a16d2b64677c7d1d3a9ee1ff03 t/release-pp-14locale.t +SHA1 585ac7a24117d215cdbf37c211b62dc8a95f6c0c t/release-pp-15jd.t +SHA1 0c18ef64cdefdd559e24a344868c62439d471ff9 t/release-pp-16truncate.t +SHA1 6df6eeaf25eea1bc9b7f4656d12b53a372e9ed36 t/release-pp-17set-return.t +SHA1 efed9f80bed6666df508d54454a62b5ff4bac7e7 t/release-pp-18today.t +SHA1 d4138dc3e1e170365fcc9941014bb982a5aaa352 t/release-pp-19leap-second.t +SHA1 c9c4ab5edc5784f7f5ce7efb800ce114c0c35dea t/release-pp-20infinite.t +SHA1 cbd0048a24c5660567916a5743c3df71efd603dd t/release-pp-21bad-params.t +SHA1 3adef69893d99eb06bda3cd7e191c8d5b342f029 t/release-pp-22from-doy.t +SHA1 d170650009c7bc6c9b54399d821fa6db04f68686 t/release-pp-23storable.t +SHA1 8088a5107f6a811f168ff52da9da8ace7661e68f t/release-pp-24from-object.t +SHA1 32aaa149c8b6262550a0489d61c8ff3da1e7d76c t/release-pp-25add-subtract.t +SHA1 e91247ec477381666b27f9011cdea1a40f4ef0ab t/release-pp-27delta.t +SHA1 9fac0177777115897c2feaf2f97ca30dbf8a8009 t/release-pp-28dow.t +SHA1 526a2d05331785d6720e2fecdbf82f30ee7707b8 t/release-pp-29overload.t +SHA1 c7846327466bd291cab1e5c2d2ba10ddc6ec1d96 t/release-pp-30future-tz.t +SHA1 fb6e3de0211a6ef61c03cfea3277a771cc352f68 t/release-pp-31formatter.t +SHA1 1e0f855e1dadfc32d5b410c251046625b3979742 t/release-pp-32leap-second2.t +SHA1 132dae776b5399e2075b3e493c77309b9ae15a09 t/release-pp-33seconds-offset.t +SHA1 8e5882efd441ccae61268cc0361ed517c8e2d2de t/release-pp-34set-tz.t +SHA1 e971fd4a9426f90608b0f1d8806ca801eae28cd7 t/release-pp-35rd-values.t +SHA1 d1a82f6d2aa957d98dd910c1e9c7d77c5a71b159 t/release-pp-36invalid-local.t +SHA1 9842ac3fcb9e459a75a1aa821e7c22f346c9fdb7 t/release-pp-36invalid_local.t +SHA1 904a289f2d7346f9e5bdddacd37b517c016469de t/release-pp-37local-add.t +SHA1 bc08f54dceb1e5c224963511fed67647299f0b6a t/release-pp-38local-subtract.t +SHA1 19aa5dc7ca6881c7e33da122c8648a15e809a159 t/release-pp-40leap-years.t +SHA1 c0449098169e99921ae5227bbdd46934cabdc23e t/release-pp-41cldr-format.t +SHA1 13449145e057fd0523ff83e500a0a501b97064ae t/release-pp-42duration-class.t +SHA1 65188e9ba94b772e23c47696cba6ca91482cb609 t/release-pp-43new-params.t +SHA1 892297a82a27d718d17a59e3b13ec55b4ed80c7a t/release-pp-44set-formatter.t SHA1 bef3937eb875e25c0fb9c95597b2a7628eb65020 tools/leap_seconds_header.pl -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) -iEYEARECAAYFAkzwAM0ACgkQIgMCsV8qvRJMbgCfdvsANVul4rULI3imlSmY13ez -OcAAmwdOrf7NPYGWCJKwye42I1WAn/4q -=wsYB +iEYEARECAAYFAk20XC4ACgkQIgMCsV8qvRIscgCeOHXz66Q8xcADhLtMwY0CDZh1 +nrQAnjNehTj6Iyb4sAccFyrSSDQMoLK+ +=qplf -----END PGP SIGNATURE----- diff --git a/dist.ini b/dist.ini index e2b61eb..6af62f4 100644 --- a/dist.ini +++ b/dist.ini @@ -1,8 +1,12 @@ name = DateTime author = Dave Rolsky -copyright_year = 2010 +license = Artistic_2_0 +copyright_holder = Dave Rolsky -version = 0.66 +version = 0.67 + +[NextRelease] +format = %-6v %{yyyy-MM-dd}d [@Filter] -bundle = @Basic @@ -30,9 +34,10 @@ repository.type = hg [SurgicalPodWeaver] -[KwaliteeTests] +[PodSyntaxTests] [NoTabsTests] [EOLTests] +[CPANChangesTests] [Signature] [CheckChangeLog] @@ -42,9 +47,11 @@ repository.type = hg [Prereqs] DateTime::Locale = 0.41 DateTime::TimeZone = 1.09 +Math::Round = 0 Params::Validate = 0.76 Scalar::Util = 0 Time::Local = 1.04 +perl = v5.8.1 [Prereqs / BuildRequires] ExtUtils::CBuilder = 0 diff --git a/lib/DateTime.pm b/lib/DateTime.pm index 3ce83ce..71d1237 100644 --- a/lib/DateTime.pm +++ b/lib/DateTime.pm @@ -1,15 +1,16 @@ package DateTime; BEGIN { - $DateTime::VERSION = '0.66'; + $DateTime::VERSION = '0.67'; } -use 5.006; +use 5.008001; use strict; use warnings; use Carp; use DateTime::Helpers; +use Math::Round qw( nearest round ); BEGIN { my $loaded = 0; @@ -200,7 +201,9 @@ sub new { Carp::croak( "Invalid day of month (day = $p{day} - month = $p{month} - year = $p{year})\n" - ) if $p{day} > $class->_month_length( $p{year}, $p{month} ); + ) + if $p{day} > 28 + && $p{day} > $class->_month_length( $p{year}, $p{month} ); return $class->_new(%p); } @@ -620,18 +623,20 @@ sub from_day_of_year { my $class = shift; my %p = validate( @_, $FromDayOfYearValidate ); - my $is_leap_year = $class->_is_leap_year( $p{year} ); - Carp::croak("$p{year} is not a leap year.\n") - if $p{day_of_year} == 366 && !$is_leap_year; + if $p{day_of_year} == 366 && !$class->_is_leap_year( $p{year} ); my $month = 1; my $day = delete $p{day_of_year}; - while ( $month <= 12 && $day > $class->_month_length( $p{year}, $month ) ) - { - $day -= $class->_month_length( $p{year}, $month ); - $month++; + if ( $day > 31 ) { + my $length = $class->_month_length( $p{year}, $month ); + + while ( $day > $length ) { + $day -= $length; + $month++; + $length = $class->_month_length( $p{year}, $month ); + } } return $class->_new( @@ -819,16 +824,9 @@ sub nanosecond { return $_[0]->{rd_nanosecs}; } -sub millisecond { _round( $_[0]->{rd_nanosecs} / 1000000 ) } - -sub microsecond { _round( $_[0]->{rd_nanosecs} / 1000 ) } - -sub _round { - my $val = shift; - my $int = int $val; +sub millisecond { round( $_[0]->{rd_nanosecs} / 1000000 ) } - return $val - $int >= 0.5 ? $int + 1 : $int; -} +sub microsecond { round( $_[0]->{rd_nanosecs} / 1000 ) } sub leap_seconds { my $self = shift; @@ -896,15 +894,17 @@ sub week { return @{ $self->{local_c} }{ 'week_year', 'week_number' }; } -# Also from DateCalc.c sub _weeks_in_year { my $self = shift; my $year = shift; - my $jan_one_dow = ( ( $self->_ymd2rd( $year, 1, 1 ) + 6 ) % 7 ) + 1; - my $dec_31_dow = ( ( $self->_ymd2rd( $year, 12, 31 ) + 6 ) % 7 ) + 1; + my $dow = $self->_ymd2rd( $year, 1, 1 ) % 7; - return $jan_one_dow == 4 || $dec_31_dow == 4 ? 53 : 52; + # Tears starting with a Thursday and leap years starting with a Wednesday + # have 53 weeks. + return ( $dow == 4 || ( $dow == 3 && $self->_is_leap_year($year) ) ) + ? 53 + : 52; } sub week_year { ( $_[0]->week )[0] } @@ -913,18 +913,10 @@ sub week_number { ( $_[0]->week )[1] } # ISO says that the first week of a year is the first week containing # a Thursday. Extending that says that the first week of the month is # the first week containing a Thursday. ICU agrees. -# -# Algorithm supplied by Rick Measham, who doesn't understand how it -# works. Neither do I. Please feel free to explain this to me! sub week_of_month { my $self = shift; - - # Faster than cloning just to get the dow - my $first_wday_of_month = ( 8 - ( $self->day - $self->dow ) % 7 ) % 7; - $first_wday_of_month = 7 unless $first_wday_of_month; - - my $wom = int( ( $self->day + $first_wday_of_month - 2 ) / 7 ); - return ( $first_wday_of_month <= 4 ) ? $wom + 1 : $wom; + my $thu = $self->day + 4 - $self->day_of_week; + return int( ( $thu + 6 ) / 7 ); } sub time_zone { @@ -1016,13 +1008,9 @@ sub mjd { $_[0]->jd - 2_400_000.5 } 't' => sub {"\t"}, 'T' => sub { $_[0]->strftime('%H:%M:%S') }, 'u' => sub { $_[0]->day_of_week }, - - # algorithm from Date::Format::wkyr 'U' => sub { - my $dow = $_[0]->day_of_week; - $dow = 0 if $dow == 7; # convert to 0-6, Sun-Sat - my $doy = $_[0]->day_of_year - 1; - return sprintf( '%02d', int( ( $doy - $dow + 13 ) / 7 - 1 ) ); + my $sun = $_[0]->day_of_year - ( $_[0]->day_of_week + 7 ) % 7; + return sprintf( '%02d', int( ( $sun + 6 ) / 7 ) ); }, 'V' => sub { sprintf( '%02d', $_[0]->week_number ) }, 'w' => sub { @@ -1030,9 +1018,8 @@ sub mjd { $_[0]->jd - 2_400_000.5 } return $dow % 7; }, 'W' => sub { - my $dow = $_[0]->day_of_week; - my $doy = $_[0]->day_of_year - 1; - return sprintf( '%02d', int( ( $doy - $dow + 13 ) / 7 - 1 ) ); + my $mon = $_[0]->day_of_year - ( $_[0]->day_of_week + 6 ) % 7; + return sprintf( '%02d', int( ( $mon + 6 ) / 7 ) ); }, 'x' => sub { $_[0]->format_cldr( $_[0]->{locale}->date_format_default() ); @@ -1310,17 +1297,12 @@ sub mjd { $_[0]->jd - 2_400_000.5 } } sub _format_nanosecs { - my $self = shift; - my $precision = shift; - - my $ret = sprintf( "%09d", $self->{rd_nanosecs} ); - return $ret unless $precision; # default = 9 digits + my $self = shift; + my $precision = @_ ? shift : 9; - # rd_nanosecs might contain a fractional separator - my ( $int, $frac ) = split /[.,]/, $self->{rd_nanosecs}; - $ret .= $frac if $frac; + my $divide_by = 10**( 9 - $precision ); - return substr( $ret, 0, $precision ); + return round( $self->{rd_nanosecs} / $divide_by ); } sub epoch { @@ -2057,7 +2039,7 @@ sub STORABLE_thaw { package DateTime::_Thawed; BEGIN { - $DateTime::_Thawed::VERSION = '0.66'; + $DateTime::_Thawed::VERSION = '0.67'; } sub utc_rd_values { @{ $_[0]->{utc_vals} } } @@ -2078,7 +2060,7 @@ DateTime - A date and time object =head1 VERSION -version 0.66 +version 0.67 =head1 SYNOPSIS @@ -2236,8 +2218,8 @@ datetimes. =head2 Math -If you are going to be using doing date math, please read the section -L. +If you are going to be using doing date math, please read the section L. =head2 Time Zone Warnings @@ -3844,12 +3826,12 @@ The time zone long name. =item * Z{1,3} -The time zone short name and the offset as one string, so something -like "CDT-0500". +The time zone offset. =item * ZZZZ -The time zone long name. +The time zone short name and the offset as one string, so something +like "CDT-0500". =item * v{1,3} @@ -4146,8 +4128,8 @@ Support for this module is provided via the datetime@perl.org email list. See http://datetime.perl.org/wiki/datetime/page/Mailing_List for details. Please submit bugs to the CPAN RT system at -http://rt.cpan.org/NoAuth/ReportBug.html?Queue=datetime or via email -at bug-datetime@rt.cpan.org. +http://rt.cpan.org/NoAuth/Bugs.html?Dist=DateTime or via email at +bug-datetime@rt.cpan.org. =head1 DONATIONS @@ -4182,11 +4164,11 @@ Dave Rolsky =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2010 by Dave Rolsky. +This software is Copyright (c) 2011 by Dave Rolsky. This is free software, licensed under: - The Artistic License 2.0 + The Artistic License 2.0 (GPL Compatible) =cut diff --git a/lib/DateTime/Duration.pm b/lib/DateTime/Duration.pm index 219d3f7..f948f63 100644 --- a/lib/DateTime/Duration.pm +++ b/lib/DateTime/Duration.pm @@ -1,6 +1,6 @@ package DateTime::Duration; BEGIN { - $DateTime::Duration::VERSION = '0.66'; + $DateTime::Duration::VERSION = '0.67'; } use strict; @@ -318,13 +318,13 @@ DateTime::Duration - Duration objects for date math =head1 VERSION -version 0.66 +version 0.67 =head1 SYNOPSIS use DateTime::Duration; - $d = DateTime::Duration->new( + $dur = DateTime::Duration->new( years => 3, months => 5, weeks => 1, @@ -335,28 +335,27 @@ version 0.66 nanoseconds => 12000 ); - # Convert to different units - $d->in_units('days', 'hours', 'seconds'); + my ( $days, $hours, $seconds ) = $dur->in_units('days', 'hours', 'seconds'); # Human-readable accessors, always positive, but consider using # DateTime::Format::Duration instead - $d->years; - $d->months; - $d->weeks; - $d->days; - $d->hours; - $d->minutes; - $d->seconds; - $d->nanoseconds; + $dur->years; + $dur->months; + $dur->weeks; + $dur->days; + $dur->hours; + $dur->minutes; + $dur->seconds; + $dur->nanoseconds; - $d->is_wrap_mode - $d->is_limit_mode - $d->is_preserve_mode + $dur->is_wrap_mode + $dur->is_limit_mode + $dur->is_preserve_mode - print $d->end_of_month_mode; + print $dur->end_of_month_mode; - # Multiple all deltas by -1 - my $opposite = $d->inverse; + # Multiply all values by -1 + my $opposite = $dur->inverse; my $bigger = $dur1 + $dur2; my $smaller = $dur1 - $dur2; # the result could be negative @@ -366,9 +365,9 @@ version 0.66 my @sorted = sort { DateTime::Duration->compare( $a, $b, $base_dt ) } @durations; - if ( $d->is_positive ) { ... } - if ( $d->is_zero ) { ... } - if ( $d->is_negative ) { ... } + if ( $dur->is_positive ) { ... } + if ( $dur->is_zero ) { ... } + if ( $dur->is_negative ) { ... } =head1 DESCRIPTION @@ -461,8 +460,8 @@ conversions possible are: =back -For the explanation of why this happens, please see the L section of the DateTime.pm +For the explanation of why this is the case, please see the L section of the DateTime.pm documentation Note that the numbers returned by this method may not match the values @@ -607,11 +606,11 @@ Dave Rolsky =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2010 by Dave Rolsky. +This software is Copyright (c) 2011 by Dave Rolsky. This is free software, licensed under: - The Artistic License 2.0 + The Artistic License 2.0 (GPL Compatible) =cut diff --git a/lib/DateTime/Helpers.pm b/lib/DateTime/Helpers.pm index c3c6704..a15722b 100644 --- a/lib/DateTime/Helpers.pm +++ b/lib/DateTime/Helpers.pm @@ -1,6 +1,6 @@ package DateTime::Helpers; BEGIN { - $DateTime::Helpers::VERSION = '0.66'; + $DateTime::Helpers::VERSION = '0.67'; } use strict; diff --git a/lib/DateTime/Infinite.pm b/lib/DateTime/Infinite.pm index 387b9aa..e7dd474 100644 --- a/lib/DateTime/Infinite.pm +++ b/lib/DateTime/Infinite.pm @@ -1,6 +1,6 @@ package DateTime::Infinite; BEGIN { - $DateTime::Infinite::VERSION = '0.66'; + $DateTime::Infinite::VERSION = '0.67'; } use strict; @@ -38,7 +38,7 @@ sub STORABLE_thaw {return} package DateTime::Infinite::Future; BEGIN { - $DateTime::Infinite::Future::VERSION = '0.66'; + $DateTime::Infinite::Future::VERSION = '0.67'; } use base qw(DateTime::Infinite); @@ -62,7 +62,7 @@ use base qw(DateTime::Infinite); package DateTime::Infinite::Past; BEGIN { - $DateTime::Infinite::Past::VERSION = '0.66'; + $DateTime::Infinite::Past::VERSION = '0.67'; } use base qw(DateTime::Infinite); @@ -98,7 +98,7 @@ DateTime::Infinite - Infinite past and future DateTime objects =head1 VERSION -version 0.66 +version 0.67 =head1 SYNOPSIS @@ -150,11 +150,11 @@ Dave Rolsky =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2010 by Dave Rolsky. +This software is Copyright (c) 2011 by Dave Rolsky. This is free software, licensed under: - The Artistic License 2.0 + The Artistic License 2.0 (GPL Compatible) =cut diff --git a/lib/DateTime/LeapSecond.pm b/lib/DateTime/LeapSecond.pm index 4d3cc23..ed8a3d0 100644 --- a/lib/DateTime/LeapSecond.pm +++ b/lib/DateTime/LeapSecond.pm @@ -1,6 +1,6 @@ package DateTime::LeapSecond; BEGIN { - $DateTime::LeapSecond::VERSION = '0.66'; + $DateTime::LeapSecond::VERSION = '0.67'; } use strict; @@ -130,7 +130,7 @@ DateTime::LeapSecond - leap seconds table and utilities =head1 VERSION -version 0.66 +version 0.67 =head1 SYNOPSIS @@ -138,8 +138,8 @@ version 0.66 use DateTime::LeapSecond; print "Leap seconds between years 1990 and 2000 are "; - print Date::Leapsecond::leap_seconds( $utc_rd_2000 ) - - Date::Leapsecond::leap_seconds( $utc_rd_1990 ); + print DateTime::Leapsecond::leap_seconds( $utc_rd_2000 ) - + DateTime::Leapsecond::leap_seconds( $utc_rd_1990 ); =head1 DESCRIPTION @@ -183,11 +183,11 @@ Dave Rolsky =head1 COPYRIGHT AND LICENSE -This software is Copyright (c) 2010 by Dave Rolsky. +This software is Copyright (c) 2011 by Dave Rolsky. This is free software, licensed under: - The Artistic License 2.0 + The Artistic License 2.0 (GPL Compatible) =cut diff --git a/lib/DateTimePP.pm b/lib/DateTimePP.pm index fe8e561..46c9b4e 100644 --- a/lib/DateTimePP.pm +++ b/lib/DateTimePP.pm @@ -1,6 +1,6 @@ package DateTime; BEGIN { - $DateTime::VERSION = '0.66'; + $DateTime::VERSION = '0.67'; } use strict; diff --git a/lib/DateTimePPExtra.pm b/lib/DateTimePPExtra.pm index 5f41c18..fed4331 100644 --- a/lib/DateTimePPExtra.pm +++ b/lib/DateTimePPExtra.pm @@ -1,6 +1,6 @@ package DateTime; BEGIN { - $DateTime::VERSION = '0.66'; + $DateTime::VERSION = '0.67'; } use strict; diff --git a/t/13strftime.t b/t/13strftime.t index e9677a8..598922b 100644 --- a/t/13strftime.t +++ b/t/13strftime.t @@ -131,6 +131,34 @@ while ( defined( my $line = ) ) { is( $dt->strftime('%%6N%n'), "%6N\n", '%%6N%n bug' ); } +{ + # Internally this becomes 119999885 nanoseconds (floating point math is awesome) + my $epoch = 1297777805.12; + my $dt = DateTime->from_epoch( epoch => $epoch ); + + my @vals = ( + 1, + 12, + 120, + 1200, + 12000, + 120000, + 1199999, + 11999989, + 119999885, + 1199998850, + ); + + my $x = 1; + for my $val (@vals) { + my $spec = '%' . $x++ . 'N'; + is( + $dt->strftime($spec), $val, + "strftime($spec) for $epoch == $val" + ); + } +} + done_testing(); # add these if we do roman-numeral stuff @@ -170,8 +198,8 @@ year => 1999, month => 9, day => 7, hour => 13, minute => 2, second => 42, nanos %M => '02' %N => '123456789' %3N => '123' -%6N => '123456' -%10N => '123456789' +%6N => '123457' +%10N => '1234567890' %p => 'PM' %r => '01:02:42 PM' %R => '13:02' @@ -265,3 +293,10 @@ it %z => '+0000' %{month} => '9' %{year} => '1999' +year => 2012, month => 1, day => 1 +%U => '01' +%W => '00' +year => 2012, month => 1, day => 10 +%U => '02' +%W => '02' + diff --git a/t/release-kwalitee.t b/t/release-cpan-changes.t similarity index 61% rename from t/release-kwalitee.t rename to t/release-cpan-changes.t index 9db5241..efcad82 100644 --- a/t/release-kwalitee.t +++ b/t/release-cpan-changes.t @@ -9,7 +9,6 @@ BEGIN { use Test::More; - -eval "use Test::Kwalitee"; -plan skip_all => "Test::Kwalitee required for testing kwalitee" - if $@; +eval 'use Test::CPAN::Changes'; +plan skip_all => 'Test::CPAN::Changes required for this test' if $@; +changes_ok(); diff --git a/t/release-pod.t b/t/release-pod-syntax.t similarity index 62% rename from t/release-pod.t rename to t/release-pod-syntax.t index bf8999d..d46a955 100644 --- a/t/release-pod.t +++ b/t/release-pod-syntax.t @@ -1,3 +1,4 @@ +#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { @@ -6,12 +7,9 @@ BEGIN { } } -use strict; -use warnings; - use Test::More; -eval "use Test::Pod 1.14"; -plan skip_all => "Test::Pod 1.14 required for testing POD" if $@; +eval "use Test::Pod 1.41"; +plan skip_all => "Test::Pod 1.41 required for testing POD" if $@; all_pod_files_ok(); diff --git a/t/release-pp-00load.t b/t/release-pp-00load.t index 8573d38..f6b41ec 100644 --- a/t/release-pp-00load.t +++ b/t/release-pp-00load.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-01sanity.t b/t/release-pp-01sanity.t index b6c82ed..23f22a9 100644 --- a/t/release-pp-01sanity.t +++ b/t/release-pp-01sanity.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-02last-day.t b/t/release-pp-02last-day.t index a88360c..eae3989 100644 --- a/t/release-pp-02last-day.t +++ b/t/release-pp-02last-day.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-03components.t b/t/release-pp-03components.t index 1df2221..47a66c9 100644 --- a/t/release-pp-03components.t +++ b/t/release-pp-03components.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-04epoch.t b/t/release-pp-04epoch.t index 0263c62..9f27a28 100644 --- a/t/release-pp-04epoch.t +++ b/t/release-pp-04epoch.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-05set.t b/t/release-pp-05set.t index 378ad1b..2adac6a 100644 --- a/t/release-pp-05set.t +++ b/t/release-pp-05set.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-06add.t b/t/release-pp-06add.t index 99aa725..f327b2c 100644 --- a/t/release-pp-06add.t +++ b/t/release-pp-06add.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-07compare.t b/t/release-pp-07compare.t index 24a2bfb..15acb19 100644 --- a/t/release-pp-07compare.t +++ b/t/release-pp-07compare.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-09greg.t b/t/release-pp-09greg.t index f8f2381..1c60811 100644 --- a/t/release-pp-09greg.t +++ b/t/release-pp-09greg.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-10subtract.t b/t/release-pp-10subtract.t index 998e007..3ed171c 100644 --- a/t/release-pp-10subtract.t +++ b/t/release-pp-10subtract.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-11duration.t b/t/release-pp-11duration.t index 37081b5..2424b0a 100644 --- a/t/release-pp-11duration.t +++ b/t/release-pp-11duration.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-12week.t b/t/release-pp-12week.t index 7c85c3e..abad0d5 100644 --- a/t/release-pp-12week.t +++ b/t/release-pp-12week.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-13strftime.t b/t/release-pp-13strftime.t index 60425c4..7e4e2ce 100644 --- a/t/release-pp-13strftime.t +++ b/t/release-pp-13strftime.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { @@ -141,6 +143,34 @@ while ( defined( my $line = ) ) { is( $dt->strftime('%%6N%n'), "%6N\n", '%%6N%n bug' ); } +{ + # Internally this becomes 119999885 nanoseconds (floating point math is awesome) + my $epoch = 1297777805.12; + my $dt = DateTime->from_epoch( epoch => $epoch ); + + my @vals = ( + 1, + 12, + 120, + 1200, + 12000, + 120000, + 1199999, + 11999989, + 119999885, + 1199998850, + ); + + my $x = 1; + for my $val (@vals) { + my $spec = '%' . $x++ . 'N'; + is( + $dt->strftime($spec), $val, + "strftime($spec) for $epoch == $val" + ); + } +} + done_testing(); # add these if we do roman-numeral stuff @@ -180,8 +210,8 @@ year => 1999, month => 9, day => 7, hour => 13, minute => 2, second => 42, nanos %M => '02' %N => '123456789' %3N => '123' -%6N => '123456' -%10N => '123456789' +%6N => '123457' +%10N => '1234567890' %p => 'PM' %r => '01:02:42 PM' %R => '13:02' @@ -275,4 +305,11 @@ it %z => '+0000' %{month} => '9' %{year} => '1999' +year => 2012, month => 1, day => 1 +%U => '01' +%W => '00' +year => 2012, month => 1, day => 10 +%U => '02' +%W => '02' + diff --git a/t/release-pp-14locale.t b/t/release-pp-14locale.t index 8f9f935..70b6e5b 100644 --- a/t/release-pp-14locale.t +++ b/t/release-pp-14locale.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-15jd.t b/t/release-pp-15jd.t index 50e7cd3..760fb5b 100644 --- a/t/release-pp-15jd.t +++ b/t/release-pp-15jd.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-16truncate.t b/t/release-pp-16truncate.t index d481647..1b5438b 100644 --- a/t/release-pp-16truncate.t +++ b/t/release-pp-16truncate.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-17set-return.t b/t/release-pp-17set-return.t index bf151a9..18c6b2b 100644 --- a/t/release-pp-17set-return.t +++ b/t/release-pp-17set-return.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-18today.t b/t/release-pp-18today.t index 44eebe7..ff17219 100644 --- a/t/release-pp-18today.t +++ b/t/release-pp-18today.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-19leap-second.t b/t/release-pp-19leap-second.t index 74a0150..b0ac11d 100644 --- a/t/release-pp-19leap-second.t +++ b/t/release-pp-19leap-second.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-20infinite.t b/t/release-pp-20infinite.t index 9488271..3d343e3 100644 --- a/t/release-pp-20infinite.t +++ b/t/release-pp-20infinite.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-21bad-params.t b/t/release-pp-21bad-params.t index adc52c3..3caf4cd 100644 --- a/t/release-pp-21bad-params.t +++ b/t/release-pp-21bad-params.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-22from-doy.t b/t/release-pp-22from-doy.t index 09f9c06..9ab4f29 100644 --- a/t/release-pp-22from-doy.t +++ b/t/release-pp-22from-doy.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-23storable.t b/t/release-pp-23storable.t index 7c31747..316eb9b 100644 --- a/t/release-pp-23storable.t +++ b/t/release-pp-23storable.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-24from-object.t b/t/release-pp-24from-object.t index dd5c8a0..5323e28 100644 --- a/t/release-pp-24from-object.t +++ b/t/release-pp-24from-object.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-25add-subtract.t b/t/release-pp-25add-subtract.t index ed86b7e..78f7261 100644 --- a/t/release-pp-25add-subtract.t +++ b/t/release-pp-25add-subtract.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-27delta.t b/t/release-pp-27delta.t index 1b1d023..4c94e08 100644 --- a/t/release-pp-27delta.t +++ b/t/release-pp-27delta.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-28dow.t b/t/release-pp-28dow.t index dd2dd00..5e6e94b 100644 --- a/t/release-pp-28dow.t +++ b/t/release-pp-28dow.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-29overload.t b/t/release-pp-29overload.t index 2fb85ca..e90a4b0 100644 --- a/t/release-pp-29overload.t +++ b/t/release-pp-29overload.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-30future-tz.t b/t/release-pp-30future-tz.t index fb85c50..17955d4 100644 --- a/t/release-pp-30future-tz.t +++ b/t/release-pp-30future-tz.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-31formatter.t b/t/release-pp-31formatter.t index 28ef4c8..8e39d4a 100644 --- a/t/release-pp-31formatter.t +++ b/t/release-pp-31formatter.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-32leap-second2.t b/t/release-pp-32leap-second2.t index 74a532b..8748515 100644 --- a/t/release-pp-32leap-second2.t +++ b/t/release-pp-32leap-second2.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-33seconds-offset.t b/t/release-pp-33seconds-offset.t index dc6f6c1..dc5eb0e 100644 --- a/t/release-pp-33seconds-offset.t +++ b/t/release-pp-33seconds-offset.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-34set-tz.t b/t/release-pp-34set-tz.t index 428cbad..d848eb8 100644 --- a/t/release-pp-34set-tz.t +++ b/t/release-pp-34set-tz.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-35rd-values.t b/t/release-pp-35rd-values.t index 589dda8..afaa133 100644 --- a/t/release-pp-35rd-values.t +++ b/t/release-pp-35rd-values.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-36invalid-local.t b/t/release-pp-36invalid-local.t index 8c22f11..439077a 100644 --- a/t/release-pp-36invalid-local.t +++ b/t/release-pp-36invalid-local.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-36invalid_local.t b/t/release-pp-36invalid_local.t index 17eebd9..c34cb22 100644 --- a/t/release-pp-36invalid_local.t +++ b/t/release-pp-36invalid_local.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-37local-add.t b/t/release-pp-37local-add.t index 973314d..4f6212b 100644 --- a/t/release-pp-37local-add.t +++ b/t/release-pp-37local-add.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-38local-subtract.t b/t/release-pp-38local-subtract.t index 70ae093..9eea043 100644 --- a/t/release-pp-38local-subtract.t +++ b/t/release-pp-38local-subtract.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-40leap-years.t b/t/release-pp-40leap-years.t index 34dc0c8..3cfd477 100644 --- a/t/release-pp-40leap-years.t +++ b/t/release-pp-40leap-years.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-41cldr-format.t b/t/release-pp-41cldr-format.t index a52d2be..95bcc94 100644 --- a/t/release-pp-41cldr-format.t +++ b/t/release-pp-41cldr-format.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-42duration-class.t b/t/release-pp-42duration-class.t index cc80fda..ddf6f7c 100644 --- a/t/release-pp-42duration-class.t +++ b/t/release-pp-42duration-class.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-43new-params.t b/t/release-pp-43new-params.t index 157d4a0..900ae42 100644 --- a/t/release-pp-43new-params.t +++ b/t/release-pp-43new-params.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN { diff --git a/t/release-pp-44set-formatter.t b/t/release-pp-44set-formatter.t index 5933a36..b03ab35 100644 --- a/t/release-pp-44set-formatter.t +++ b/t/release-pp-44set-formatter.t @@ -1,3 +1,5 @@ + + use Test::More; BEGIN {