diff options
author | 2010-01-15 09:05:04 +0000 | |
---|---|---|
committer | 2010-01-15 09:05:04 +0000 | |
commit | 6e4a2fcc71b3f37335f76c809fe7a8420d5b5c6d (patch) | |
tree | f2e09cc331dc38201b4bed205d47a8cced22ee0b /dev-perl/DateTime-Format-ISO8601 | |
parent | Add ppc64 love #291287. (diff) | |
download | historical-6e4a2fcc71b3f37335f76c809fe7a8420d5b5c6d.tar.gz historical-6e4a2fcc71b3f37335f76c809fe7a8420d5b5c6d.tar.bz2 historical-6e4a2fcc71b3f37335f76c809fe7a8420d5b5c6d.zip |
Fix _fix_1_digit_year to work in 2010 (#298966). Cleanup
Package-Manager: portage-2.2_rc61/cvs/Linux x86_64
Diffstat (limited to 'dev-perl/DateTime-Format-ISO8601')
-rw-r--r-- | dev-perl/DateTime-Format-ISO8601/ChangeLog | 11 | ||||
-rw-r--r-- | dev-perl/DateTime-Format-ISO8601/DateTime-Format-ISO8601-0.06-r1.ebuild (renamed from dev-perl/DateTime-Format-ISO8601/DateTime-Format-ISO8601-0.06.ebuild) | 5 | ||||
-rw-r--r-- | dev-perl/DateTime-Format-ISO8601/Manifest | 13 | ||||
-rw-r--r-- | dev-perl/DateTime-Format-ISO8601/files/fix_1_digit_year.patch | 120 |
4 files changed, 139 insertions, 10 deletions
diff --git a/dev-perl/DateTime-Format-ISO8601/ChangeLog b/dev-perl/DateTime-Format-ISO8601/ChangeLog index 099c971faec9..a8bbaf123905 100644 --- a/dev-perl/DateTime-Format-ISO8601/ChangeLog +++ b/dev-perl/DateTime-Format-ISO8601/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-perl/DateTime-Format-ISO8601 -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-perl/DateTime-Format-ISO8601/ChangeLog,v 1.2 2009/11/23 18:49:13 tove Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-perl/DateTime-Format-ISO8601/ChangeLog,v 1.3 2010/01/15 09:05:03 tove Exp $ + +*DateTime-Format-ISO8601-0.06-r1 (15 Jan 2010) + + 15 Jan 2010; Torsten Veller <tove@gentoo.org> + +files/fix_1_digit_year.patch, -DateTime-Format-ISO8601-0.06.ebuild, + +DateTime-Format-ISO8601-0.06-r1.ebuild: + Fix _fix_1_digit_year to work in 2010 (#298966). Cleanup 23 Nov 2009; Torsten Veller <tove@gentoo.org> DateTime-Format-ISO8601-0.06.ebuild: diff --git a/dev-perl/DateTime-Format-ISO8601/DateTime-Format-ISO8601-0.06.ebuild b/dev-perl/DateTime-Format-ISO8601/DateTime-Format-ISO8601-0.06-r1.ebuild index 17a88a958cf2..29431b52363f 100644 --- a/dev-perl/DateTime-Format-ISO8601/DateTime-Format-ISO8601-0.06.ebuild +++ b/dev-perl/DateTime-Format-ISO8601/DateTime-Format-ISO8601-0.06-r1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-perl/DateTime-Format-ISO8601/DateTime-Format-ISO8601-0.06.ebuild,v 1.3 2009/11/23 18:49:13 tove Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-perl/DateTime-Format-ISO8601/DateTime-Format-ISO8601-0.06-r1.ebuild,v 1.1 2010/01/15 09:05:03 tove Exp $ EAPI=2 @@ -22,3 +22,4 @@ DEPEND="${RDEPEND} dev-perl/Test-Distribution )" SRC_TEST=do +PATCHES=( "${FILESDIR}"/fix_1_digit_year.patch ) diff --git a/dev-perl/DateTime-Format-ISO8601/Manifest b/dev-perl/DateTime-Format-ISO8601/Manifest index e6e8e877ba2e..a6713716006d 100644 --- a/dev-perl/DateTime-Format-ISO8601/Manifest +++ b/dev-perl/DateTime-Format-ISO8601/Manifest @@ -1,14 +1,15 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 +AUX fix_1_digit_year.patch 3299 RMD160 6ef6b9538bd2275a006f31a334af536723ffe64a SHA1 e7c4d24ba810272c170fdd976e5666df711796cb SHA256 aa2a417201ea1fd9cfbacd5fe628ce338857e7c7f98038480e253843443fa847 DIST DateTime-Format-ISO8601-0.06.tar.gz 20473 RMD160 5eef766316c1c41c1b81d11e0cbcc1cedf8d2a33 SHA1 310af0fb20dfaecf0ab956a638192033095fc194 SHA256 b15396dfc0a483b0b5d3150a98366f42173661a5a806e8c4c555f5c0a6f75e5c -EBUILD DateTime-Format-ISO8601-0.06.ebuild 592 RMD160 5b2d8346c66d86c8300ee04182c8cdf8816e3a11 SHA1 4bd2179d1af35d44898b61cd3dea3b90152f2848 SHA256 115435cd46864794c914f995263db8278e6a61f9ce6b4f3c450506655704780c -MISC ChangeLog 576 RMD160 08a3c42f93a7ae24ded507a44200bbe496e56b8d SHA1 29f8aefdf39b7d6efccfd0ccd83627863e84ee04 SHA256 a8ba3ea725a398b9060bd0dcf4acbac6094831ce07a30533cac09c9e8ff1da1f +EBUILD DateTime-Format-ISO8601-0.06-r1.ebuild 644 RMD160 9d4aca3874c0133520ea20fd84908a39576ba5be SHA1 db327f3db22a9fe7dcc9bf836867d43064a92f36 SHA256 079e9bbf019b0467eb478e8343ac17177928201177d8caac5da3181e82dfbaf4 +MISC ChangeLog 846 RMD160 211d33057cc8534681f27b131d1d09d18182ccb3 SHA1 a8260b280d9ff25232e809d2603732c714da1caf SHA256 95873f8931c6694c113ee8d6c2c1c05986c500d7b4bd6171e4317547c1d7819c MISC metadata.xml 271 RMD160 33d1e6d38b3ecde19f2a3a873476e4fc03fd0a41 SHA1 1b49b2ba691f42cbf4f86231769f560b7232453a SHA256 0670df6d1cf19fc80b5a9b574234d0d260f42c2c1889155d94922b0d63976ac2 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.11 (GNU/Linux) +Version: GnuPG v2.0.14 (GNU/Linux) -iEYEARECAAYFAksK2S4ACgkQV3J2n04EauxP+gCfeOoOJV6qVfH7GENEO9mFIcmH -9K4AnAsD+IoUci9ISqsAzEvsSIs+oXJQ -=nq+c +iEYEARECAAYFAktQL+EACgkQV3J2n04EauwQZwCffK504dhx9ao/NsjSABP1ND3j +2L0An0WNirovguTL8fQzG2t74ErCJ+0n +=9PHs -----END PGP SIGNATURE----- diff --git a/dev-perl/DateTime-Format-ISO8601/files/fix_1_digit_year.patch b/dev-perl/DateTime-Format-ISO8601/files/fix_1_digit_year.patch new file mode 100644 index 000000000000..4e1476832a46 --- /dev/null +++ b/dev-perl/DateTime-Format-ISO8601/files/fix_1_digit_year.patch @@ -0,0 +1,120 @@ +Origin: other, http://github.com/oalders/DateTime-Format-ISO8601/commit/ed1ed506e3f914bd78ec452e50ec15fefe19ac75 +--- a/lib/DateTime/Format/ISO8601.pm ++++ b/lib/DateTime/Format/ISO8601.pm +@@ -112,7 +112,7 @@ + }, + } + ); +- ++ + # ISO8601 only allows years 0 to 9999 + # this implimentation ignores the needs of expanded formats + my $dt = DateTime->from_object( object => $args{ object } ); +@@ -182,7 +182,7 @@ + params => [ qw( year month day ) ], + }, + { +- # uncombined with above because ++ # uncombined with above because + #regex => qr/^ (\d{4}) -?? (\d\d) -?? (\d\d) $/x, + # was matching 152746-05 + +@@ -805,20 +805,18 @@ + + sub _fix_1_digit_year { + my %p = @_; +- +- no strict 'refs'; +- my $year = ( $p{ self }{ base_datetime } || DateTime->now )->year; +- use strict; + +- $year =~ s/.$//; +- $p{ parsed }{ year } = $year . $p{ parsed }{ year }; ++ no strict 'refs'; ++ my $year = ( $p{ self }{ base_datetime } || DateTime->now )->strftime('%C') * 100; + ++ use strict; ++ $p{ parsed }{ year } = $year + $p{ parsed }{ year }; + return 1; + } + + sub _fix_2_digit_year { + my %p = @_; +- ++ + # this is a mess because of the need to support parse_* being called + # as a class method + no strict 'refs'; +@@ -904,7 +902,7 @@ + sub _fractional_second { + my %p = @_; + +- $p{ parsed }{ nanosecond } = ".$p{ parsed }{ nanosecond }" * 10**9; ++ $p{ parsed }{ nanosecond } = ".$p{ parsed }{ nanosecond }" * 10**9; + + return 1; + } +@@ -912,7 +910,7 @@ + sub _fractional_minute { + my %p = @_; + +- $p{ parsed }{ second } = ".$p{ parsed }{ second }" * 60; ++ $p{ parsed }{ second } = ".$p{ parsed }{ second }" * 60; + + return 1; + } +@@ -920,7 +918,7 @@ + sub _fractional_hour { + my %p = @_; + +- $p{ parsed }{ minute } = ".$p{ parsed }{ minute }" * 60; ++ $p{ parsed }{ minute } = ".$p{ parsed }{ minute }" * 60; + + return 1; + } +@@ -953,7 +951,7 @@ + my $dt = DateTime->new( + year => $p{ parsed }{ year }, + ); +- ++ + if ( $dt->week_number == 1 ) { + $p{ parsed }{ week } -= 1; + } +--- a/t/02_examples.t ++++ b/t/02_examples.t +@@ -228,7 +228,7 @@ + { + #-YWwwD -5W155 + my $dt = DateTime::Format::ISO8601->parse_datetime( '-5W155' ); +- is( $dt->year, '2005' ); ++ is( $dt->year, '2005', '-5W155' ); + is( $dt->week_number, '15' ); + is( $dt->day_of_week, '5' ); + } +@@ -236,7 +236,7 @@ + { + #-Y-Www-D -5-W15-5 + my $dt = DateTime::Format::ISO8601->parse_datetime( '-5-W15-5' ); +- is( $dt->year, '2005' ); ++ is( $dt->year, '2005', '-5-W15-5' ); + is( $dt->week_number, '15' ); + is( $dt->day_of_week, '5' ); + } +@@ -244,14 +244,14 @@ + { + #-YWww -5W15 + my $dt = DateTime::Format::ISO8601->parse_datetime( '-5W15' ); +- is( $dt->year, '2005' ); ++ is( $dt->year, '2005', '-5W15' ); + is( $dt->week_number, '15' ); + } + + { + #-Y-Www -5-W15 + my $dt = DateTime::Format::ISO8601->parse_datetime( '-5-W15' ); +- is( $dt->year, '2005' ); ++ is( $dt->year, '2005', '-5W15' ); + is( $dt->week_number, '15' ); + } + |