r47127 - in /trunk/libtimedate-perl: ./ debian/ lib/Date/ lib/Date/Language/ lib/Time/ t/

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Fri Nov 13 22:38:44 UTC 2009


Author: gregoa
Date: Fri Nov 13 22:38:37 2009
New Revision: 47127

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=47127
Log:
New upstream release.

Added:
    trunk/libtimedate-perl/META.yml
      - copied unchanged from r47126, branches/upstream/libtimedate-perl/current/META.yml
    trunk/libtimedate-perl/SIGNATURE
      - copied unchanged from r47126, branches/upstream/libtimedate-perl/current/SIGNATURE
    trunk/libtimedate-perl/lib/Date/Language/Chinese.pm
      - copied unchanged from r47126, branches/upstream/libtimedate-perl/current/lib/Date/Language/Chinese.pm
    trunk/libtimedate-perl/lib/Date/Language/Hungarian.pm
      - copied unchanged from r47126, branches/upstream/libtimedate-perl/current/lib/Date/Language/Hungarian.pm
    trunk/libtimedate-perl/lib/Date/Language/Icelandic.pm
      - copied unchanged from r47126, branches/upstream/libtimedate-perl/current/lib/Date/Language/Icelandic.pm
    trunk/libtimedate-perl/lib/Date/Language/Romanian.pm
      - copied unchanged from r47126, branches/upstream/libtimedate-perl/current/lib/Date/Language/Romanian.pm
    trunk/libtimedate-perl/lib/Date/Language/Russian.pm
      - copied unchanged from r47126, branches/upstream/libtimedate-perl/current/lib/Date/Language/Russian.pm
    trunk/libtimedate-perl/lib/Date/Language/Russian_cp1251.pm
      - copied unchanged from r47126, branches/upstream/libtimedate-perl/current/lib/Date/Language/Russian_cp1251.pm
    trunk/libtimedate-perl/lib/Date/Language/Russian_koi8r.pm
      - copied unchanged from r47126, branches/upstream/libtimedate-perl/current/lib/Date/Language/Russian_koi8r.pm
    trunk/libtimedate-perl/lib/Date/Language/Spanish.pm
      - copied unchanged from r47126, branches/upstream/libtimedate-perl/current/lib/Date/Language/Spanish.pm
    trunk/libtimedate-perl/lib/Date/Language/Turkish.pm
      - copied unchanged from r47126, branches/upstream/libtimedate-perl/current/lib/Date/Language/Turkish.pm
    trunk/libtimedate-perl/t/cpanrt.t
      - copied unchanged from r47126, branches/upstream/libtimedate-perl/current/t/cpanrt.t
Modified:
    trunk/libtimedate-perl/ChangeLog
    trunk/libtimedate-perl/MANIFEST
    trunk/libtimedate-perl/Makefile.PL
    trunk/libtimedate-perl/README
    trunk/libtimedate-perl/debian/changelog
    trunk/libtimedate-perl/lib/Date/Format.pm
    trunk/libtimedate-perl/lib/Date/Language.pm
    trunk/libtimedate-perl/lib/Date/Language/Austrian.pm
    trunk/libtimedate-perl/lib/Date/Language/Danish.pm
    trunk/libtimedate-perl/lib/Date/Language/German.pm
    trunk/libtimedate-perl/lib/Date/Language/Italian.pm
    trunk/libtimedate-perl/lib/Date/Language/Norwegian.pm
    trunk/libtimedate-perl/lib/Date/Language/Swedish.pm
    trunk/libtimedate-perl/lib/Date/Language/Tigrinya.pm
    trunk/libtimedate-perl/lib/Date/Parse.pm
    trunk/libtimedate-perl/lib/Time/Zone.pm
    trunk/libtimedate-perl/t/date.t
    trunk/libtimedate-perl/t/getdate.t

Modified: trunk/libtimedate-perl/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtimedate-perl/ChangeLog?rev=47127&op=diff
==============================================================================
--- trunk/libtimedate-perl/ChangeLog (original)
+++ trunk/libtimedate-perl/ChangeLog Fri Nov 13 22:38:37 2009
@@ -1,3 +1,38 @@
+1.19 -- Fri Sep 25 13:59:41 CDT 2009
+
+  * Replace Date::Language::Hungarian with version from CPAN by Lee Goddard
+
+1.18 -- Thu Sep 24 17:43:28 CDT 2009
+
+  * RT#49963 Skip pre 1970 date tests on Win32
+  * Added Date::Language::Hungarian (Konrad Lorinczi)
+
+1.17 -- Sat Sep 19 10:56:12 CDT 2009
+
+Bugfixes
+  * RT#45067: Date::Format with %z gives wrong results for half-hour timezones (Ernesto Hernández-Novich)
+  * RT#48164: Date::Parse unable to set seconds correctly
+  * RT#17396: Parse error for french date with 'mars' (march) as month
+
+Documentation
+  * Fixed documentation for %e in Date::Format
+  * Update documentation to remove Date::Format->language
+
+Enhancements
+  * Add support for dates like Jul-13-1999 (Brett Warden)
+  * Added Icelandic language (Tomas Edwardsson)
+  * Added Romanian language (Doru Petrescu)
+  * Added Russian language (Denis Poznyakov & Danil Pismenny)
+  * Added Turkish language (Burak Gursoy)
+  * Added Spanish language (Adrian Mugnolo)
+  * Added Chinese language (Kang-min Liu)
+  * Support parsing dates like 2002-02-26-10:37:21.141 as used by lpd
+  * Support Z timezone when only the time is specified
+  * Added METDST to Time::Zone
+  * Added AKST/AKDT to Time::Zone
+
+Changes prior to 1.17
+
 Change 814 on 2003/06/03 by <gbarr at pobox.com> (Graham Barr)
 
 	Date::Parse

Modified: trunk/libtimedate-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtimedate-perl/MANIFEST?rev=47127&op=diff
==============================================================================
--- trunk/libtimedate-perl/MANIFEST (original)
+++ trunk/libtimedate-perl/MANIFEST Fri Nov 13 22:38:37 2009
@@ -1,13 +1,11 @@
 ChangeLog
-MANIFEST
-Makefile.PL
-README
 lib/Date/Format.pm
 lib/Date/Language.pm
 lib/Date/Language/Afar.pm
 lib/Date/Language/Amharic.pm
 lib/Date/Language/Austrian.pm
 lib/Date/Language/Brazilian.pm
+lib/Date/Language/Chinese.pm
 lib/Date/Language/Chinese_GB.pm
 lib/Date/Language/Czech.pm
 lib/Date/Language/Danish.pm
@@ -18,18 +16,32 @@
 lib/Date/Language/Gedeo.pm
 lib/Date/Language/German.pm
 lib/Date/Language/Greek.pm
+lib/Date/Language/Hungarian.pm
+lib/Date/Language/Icelandic.pm
 lib/Date/Language/Italian.pm
 lib/Date/Language/Norwegian.pm
 lib/Date/Language/Oromo.pm
+lib/Date/Language/Romanian.pm
+lib/Date/Language/Russian.pm
+lib/Date/Language/Russian_cp1251.pm
+lib/Date/Language/Russian_koi8r.pm
 lib/Date/Language/Sidama.pm
 lib/Date/Language/Somali.pm
+lib/Date/Language/Spanish.pm
 lib/Date/Language/Swedish.pm
 lib/Date/Language/Tigrinya.pm
 lib/Date/Language/TigrinyaEritrean.pm
 lib/Date/Language/TigrinyaEthiopian.pm
+lib/Date/Language/Turkish.pm
 lib/Date/Parse.pm
 lib/Time/Zone.pm
+Makefile.PL
+MANIFEST
+README
+t/cpanrt.t
 t/date.t
 t/format.t
 t/getdate.t
 t/lang.t
+META.yml                                 Module meta-data (added by MakeMaker)
+SIGNATURE                                Public-key signature (added by MakeMaker)

Modified: trunk/libtimedate-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtimedate-perl/Makefile.PL?rev=47127&op=diff
==============================================================================
--- trunk/libtimedate-perl/Makefile.PL (original)
+++ trunk/libtimedate-perl/Makefile.PL Fri Nov 13 22:38:37 2009
@@ -1,20 +1,23 @@
 # This -*- perl -*- script makes the Makefile
-# $Id: //depot/TimeDate/Makefile.PL#11 $
-
-#--- Distribution section ---
-
-$DISTNAME = 'TimeDate';
-$VERSION  = "1.16";
-
-#--- Write the Makefile
 
 BEGIN { require 5.004 }
 
+use strict;
+use warnings;
 use ExtUtils::MakeMaker;
 
 WriteMakefile(
-	VERSION   => $VERSION,
-	NAME      => $DISTNAME,
+  NAME    => 'TimeDate',
+  AUTHOR  => 'Graham Barr <gbarr at pobox.com>',
+  VERSION => '1.19',
+  (eval { ExtUtils::MakeMaker->VERSION(6.21) } ? (LICENSE => 'perl') : ()),
+  ( eval { ExtUtils::MakeMaker->VERSION(6.46) } ? (
+      META_MERGE => {
+        resources => {    ##
+          repository => 'http://github.com/gbarr/perl-TimeDate',
+        },
+      }
+      )
+    : ()
+  ),
 );
-
-

Modified: trunk/libtimedate-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtimedate-perl/README?rev=47127&op=diff
==============================================================================
--- trunk/libtimedate-perl/README (original)
+++ trunk/libtimedate-perl/README Fri Nov 13 22:38:37 2009
@@ -18,7 +18,7 @@
 
 Please report any bugs/suggestions to <gbarr at pobox.com>
 
-Copyright 1996-2000 Graham Barr. All rights reserved.
+Copyright 1995-2009 Graham Barr.
 
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself.

Modified: trunk/libtimedate-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtimedate-perl/debian/changelog?rev=47127&op=diff
==============================================================================
--- trunk/libtimedate-perl/debian/changelog (original)
+++ trunk/libtimedate-perl/debian/changelog Fri Nov 13 22:38:37 2009
@@ -1,4 +1,4 @@
-libtimedate-perl (1.1600-10) UNRELEASED; urgency=low
+libtimedate-perl (1.1900-1) UNRELEASED; urgency=low
 
   NOTE:
   [2009-10-11] Accepted 1.1900-1 in unstable (low) (Christian Hammers)
@@ -22,8 +22,9 @@
     Uploaders.
   * Rename source package to libtimedate-perl.
   * Change my email address.
-
- -- gregor herrmann <gregor+debian at comodo.priv.at>  Sun, 28 Oct 2007 19:07:48 +0100
+  * New upstream release.
+
+ -- gregor herrmann <gregoa at debian.org>  Fri, 13 Nov 2009 23:37:37 +0100
 
 timedate (1.1600-9) unstable; urgency=low
 

Modified: trunk/libtimedate-perl/lib/Date/Format.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtimedate-perl/lib/Date/Format.pm?rev=47127&op=diff
==============================================================================
--- trunk/libtimedate-perl/lib/Date/Format.pm (original)
+++ trunk/libtimedate-perl/lib/Date/Format.pm Fri Nov 13 22:38:37 2009
@@ -1,6 +1,4 @@
-# Date::Format $Id: //depot/TimeDate/lib/Date/Format.pm#9 $
-#
-# Copyright (c) 1995-1999 Graham Barr. All rights reserved. This program is free
+# Copyright (c) 1995-2009 Graham Barr. This program is free
 # software; you can redistribute it and/or modify it under the same terms
 # as Perl itself.
 
@@ -10,7 +8,7 @@
 use     vars qw(@EXPORT @ISA $VERSION);
 require Exporter;
 
-$VERSION = "2.22";
+$VERSION = "2.23";
 @ISA     = qw(Exporter);
 @EXPORT  = qw(time2str strftime ctime asctime);
 
@@ -236,7 +234,7 @@
 sub format_z {
  my $t = timelocal(@{$_[0]}[0..5]);
  my $o = defined $tzname ? tz_offset($tzname, $t) : tz_offset(undef,$t);
- sprintf("%+03d%02d", int($o / 3600), abs(int($o % 3600)));
+ sprintf("%+03d%02d", int($o / 3600), int(abs($o) % 3600) / 60);
 }
 
 sub format_c { &format_x . " " . &format_X }
@@ -324,17 +322,10 @@
 
 =head1 MULTI-LANGUAGE SUPPORT
 
-Date::Format is capable of formating into several languages, these are
-English, French, German and Italian. Changing the language is done via
-a static method call, for example
-
-	Date::Format->language('German');
-
-will change the language in which all subsequent dates are formatted.
-
-This is only a first pass, I am considering changing this to be
-
-	$lang = Date::Language->new('German');
+Date::Format is capable of formating into several languages by creating
+a language specific object and calling methods, see L<Date::Language>
+
+	my $lang = Date::Language->new('German');
 	$lang->time2str("%a %b %e %T %Y\n", time);
 
 I am open to suggestions on this.
@@ -354,7 +345,7 @@
 	%c	MM/DD/YY HH:MM:SS
 	%C 	ctime format: Sat Nov 19 21:05:57 1994
 	%d 	numeric day of the month, with leading zeros (eg 01..31)
-	%e 	numeric day of the month, without leading zeros (eg 1..31)
+	%e 	like %d, but a leading zero is replaced by a space (eg  1..32)
 	%D 	MM/DD/YY
 	%G	GPS week number (weeks since January 6, 1980)
 	%h 	month abbr
@@ -391,13 +382,19 @@
 C<%y> and C<%Y> can be output in Roman numerals by prefixing the letter
 with C<O>, e.g. C<%OY> will output the year as roman numerals.
 
+=head1 LIMITATION
+
+The functions in this module are limited to the time range that can be
+represented by the time_t data type, i.e. 1901-12-13 20:45:53 GMT to
+2038-01-19 03:14:07 GMT.
+
 =head1 AUTHOR
 
 Graham Barr <gbarr at pobox.com>
 
 =head1 COPYRIGHT
 
-Copyright (c) 1995-1999 Graham Barr. All rights reserved. This program is free
+Copyright (c) 1995-2009 Graham Barr. This program is free
 software; you can redistribute it and/or modify it under the same terms
 as Perl itself.
 

Modified: trunk/libtimedate-perl/lib/Date/Language.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtimedate-perl/lib/Date/Language.pm?rev=47127&op=diff
==============================================================================
--- trunk/libtimedate-perl/lib/Date/Language.pm (original)
+++ trunk/libtimedate-perl/lib/Date/Language.pm Fri Nov 13 22:38:37 2009
@@ -81,3 +81,64 @@
 }
 
 1;
+
+__END__
+
+
+=head1 NAME
+
+Date::Language - Language specific date formating and parsing
+
+=head1 SYNOPSIS
+
+  use Date::Language;
+
+  my $lang = Date::Language->new('German');
+  $lang->time2str("%a %b %e %T %Y\n", time);
+
+=head1 DESCRIPTION
+
+L<Date::Language> provides objects to parse and format dates for specific languages. Available languages are
+
+  Afar                    French                  Russian_cp1251
+  Amharic                 Gedeo                   Russian_koi8r
+  Austrian                German                  Sidama
+  Brazilian               Greek                   Somali
+  Chinese                 Hungarian               Spanish
+  Chinese_GB              Icelandic               Swedish
+  Czech                   Italian                 Tigrinya
+  Danish                  Norwegian               TigrinyaEritrean
+  Dutch                   Oromo                   TigrinyaEthiopian
+  English                 Romanian                Turkish
+  Finnish                 Russian
+
+=head1 METHODS
+
+=over
+
+=item time2str
+
+See L<Date::Format/time2str>
+
+=item strftime
+
+See L<Date::Format/strftime>
+
+=item ctime
+
+See L<Date::Format/ctime>
+
+=item asctime
+
+See L<Date::Format/asctime>
+
+=item str2time
+
+See L<Date::Parse/str2time>
+
+=item strptime
+
+See L<Date::Parse/strptime>
+
+=back
+

Modified: trunk/libtimedate-perl/lib/Date/Language/Austrian.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtimedate-perl/lib/Date/Language/Austrian.pm?rev=47127&op=diff
==============================================================================
--- trunk/libtimedate-perl/lib/Date/Language/Austrian.pm (original)
+++ trunk/libtimedate-perl/lib/Date/Language/Austrian.pm Fri Nov 13 22:38:37 2009
@@ -15,6 +15,7 @@
 @DoW  = qw(Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag);
 @DoWs = qw(Son Mon Die Mit Don Fre Sam);
 
+use Date::Language::English ();
 @AMPM = @{Date::Language::English::AMPM};
 @Dsuf = @{Date::Language::English::Dsuf};
 

Modified: trunk/libtimedate-perl/lib/Date/Language/Danish.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtimedate-perl/lib/Date/Language/Danish.pm?rev=47127&op=diff
==============================================================================
--- trunk/libtimedate-perl/lib/Date/Language/Danish.pm (original)
+++ trunk/libtimedate-perl/lib/Date/Language/Danish.pm Fri Nov 13 22:38:37 2009
@@ -15,6 +15,7 @@
 @DoW  = qw(Søndag Mandag Tirsdag Onsdag Torsdag Fredag Lørdag Søndag);
 @DoWs = qw(Søn Man Tir Ons Tor Fre Lør Søn);
 
+use Date::Language::English ();
 @AMPM =   @{Date::Language::English::AMPM};
 @Dsuf =   @{Date::Language::English::Dsuf};
 

Modified: trunk/libtimedate-perl/lib/Date/Language/German.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtimedate-perl/lib/Date/Language/German.pm?rev=47127&op=diff
==============================================================================
--- trunk/libtimedate-perl/lib/Date/Language/German.pm (original)
+++ trunk/libtimedate-perl/lib/Date/Language/German.pm Fri Nov 13 22:38:37 2009
@@ -15,7 +15,7 @@
 @DoW  = qw(Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag);
 @DoWs = qw(Son Mon Die Mit Don Fre Sam);
 
-require Date::Language::English;
+use Date::Language::English ();
 @AMPM =   @{Date::Language::English::AMPM};
 @Dsuf =   @{Date::Language::English::Dsuf};
 

Modified: trunk/libtimedate-perl/lib/Date/Language/Italian.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtimedate-perl/lib/Date/Language/Italian.pm?rev=47127&op=diff
==============================================================================
--- trunk/libtimedate-perl/lib/Date/Language/Italian.pm (original)
+++ trunk/libtimedate-perl/lib/Date/Language/Italian.pm Fri Nov 13 22:38:37 2009
@@ -15,6 +15,7 @@
 @DoW  = qw(Domenica Lunedi Martedi Mercoledi Giovedi Venerdi Sabato);
 @DoWs = qw(Dom Lun Mar Mer Gio Ven Sab);
 
+use Date::Language::English ();
 @AMPM =   @{Date::Language::English::AMPM};
 @Dsuf =   @{Date::Language::English::Dsuf};
 

Modified: trunk/libtimedate-perl/lib/Date/Language/Norwegian.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtimedate-perl/lib/Date/Language/Norwegian.pm?rev=47127&op=diff
==============================================================================
--- trunk/libtimedate-perl/lib/Date/Language/Norwegian.pm (original)
+++ trunk/libtimedate-perl/lib/Date/Language/Norwegian.pm Fri Nov 13 22:38:37 2009
@@ -15,6 +15,7 @@
 @DoW  = qw(Søndag Mandag Tirsdag Onsdag Torsdag Fredag Lørdag Søndag);
 @DoWs = qw(Søn Man Tir Ons Tor Fre Lør Søn);
 
+use Date::Language::English ();
 @AMPM =   @{Date::Language::English::AMPM};
 @Dsuf =   @{Date::Language::English::Dsuf};
 

Modified: trunk/libtimedate-perl/lib/Date/Language/Swedish.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtimedate-perl/lib/Date/Language/Swedish.pm?rev=47127&op=diff
==============================================================================
--- trunk/libtimedate-perl/lib/Date/Language/Swedish.pm (original)
+++ trunk/libtimedate-perl/lib/Date/Language/Swedish.pm Fri Nov 13 22:38:37 2009
@@ -19,6 +19,7 @@
 # the ordinals are not typically used in modern times
 @Dsuf = ('a' x 2, 'e' x 29);
 
+use Date::Language::English ();
 @AMPM =   @{Date::Language::English::AMPM};
 
 
@@ -37,4 +38,4 @@
 sub format_p { $_[0]->[2] >= 12 ?  $AMPM[1] : $AMPM[0] }
 sub format_o { sprintf("%2de",$_[0]->[3]) }
 
-1;
+1;

Modified: trunk/libtimedate-perl/lib/Date/Language/Tigrinya.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtimedate-perl/lib/Date/Language/Tigrinya.pm?rev=47127&op=diff
==============================================================================
--- trunk/libtimedate-perl/lib/Date/Language/Tigrinya.pm (original)
+++ trunk/libtimedate-perl/lib/Date/Language/Tigrinya.pm Fri Nov 13 22:38:37 2009
@@ -9,28 +9,28 @@
 @ISA = qw(Date::Language);
 $VERSION = "1.00";
 
- at DoW = qw(
-"\x{U1230}\x{U1295}\x{U1260}\x{U1275}",
-"\x{U1230}\x{U1291}\x{U12ed}",
-"\x{U1230}\x{U1209}\x{U1235}",
-"\x{U1228}\x{U1261}\x{U12d5}",
-"\x{U1213}\x{U1219}\x{U1235}",
-"\x{U12d3}\x{U122d}\x{U1262}",
-"\x{U1240}\x{U12f3}\x{U121d}"
+ at DoW = (
+"\x{1230}\x{1295}\x{1260}\x{1275}",
+"\x{1230}\x{1291}\x{12ed}",
+"\x{1230}\x{1209}\x{1235}",
+"\x{1228}\x{1261}\x{12d5}",
+"\x{1213}\x{1219}\x{1235}",
+"\x{12d3}\x{122d}\x{1262}",
+"\x{1240}\x{12f3}\x{121d}"
 );
- at MoY = qw(
-"\x{U1303}\x{U1295}\x{U12e9}\x{U12c8}\x{U122a}",
-"\x{U134c}\x{U1265}\x{U1229}\x{U12c8}\x{U122a}",
-"\x{U121b}\x{U122d}\x{U127d}",
-"\x{U12a4}\x{U1355}\x{U1228}\x{U120d}",
-"\x{U121c}\x{U12ed}",
-"\x{U1301}\x{U1295}",
-"\x{U1301}\x{U120b}\x{U12ed}",
-"\x{U12a6}\x{U1308}\x{U1235}\x{U1275}",
-"\x{U1234}\x{U1355}\x{U1274}\x{U121d}\x{U1260}\x{U122d}",
-"\x{U12a6}\x{U12ad}\x{U1270}\x{U12cd}\x{U1260}\x{U122d}",
-"\x{U1296}\x{U126c}\x{U121d}\x{U1260}\x{U122d}",
-"\x{U12f2}\x{U1234}\x{U121d}\x{U1260}\x{U122d}"
+ at MoY = (
+"\x{1303}\x{1295}\x{12e9}\x{12c8}\x{122a}",
+"\x{134c}\x{1265}\x{1229}\x{12c8}\x{122a}",
+"\x{121b}\x{122d}\x{127d}",
+"\x{12a4}\x{1355}\x{1228}\x{120d}",
+"\x{121c}\x{12ed}",
+"\x{1301}\x{1295}",
+"\x{1301}\x{120b}\x{12ed}",
+"\x{12a6}\x{1308}\x{1235}\x{1275}",
+"\x{1234}\x{1355}\x{1274}\x{121d}\x{1260}\x{122d}",
+"\x{12a6}\x{12ad}\x{1270}\x{12cd}\x{1260}\x{122d}",
+"\x{1296}\x{126c}\x{121d}\x{1260}\x{122d}",
+"\x{12f2}\x{1234}\x{121d}\x{1260}\x{122d}"
 );
 @DoWs = map { substr($_,0,3) } @DoW;
 @MoYs = map { substr($_,0,3) } @MoY;

Modified: trunk/libtimedate-perl/lib/Date/Parse.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtimedate-perl/lib/Date/Parse.pm?rev=47127&op=diff
==============================================================================
--- trunk/libtimedate-perl/lib/Date/Parse.pm (original)
+++ trunk/libtimedate-perl/lib/Date/Parse.pm Fri Nov 13 22:38:37 2009
@@ -1,6 +1,4 @@
-# Date::Parse $Id: //depot/TimeDate/lib/Date/Parse.pm#22 $
-#
-# Copyright (c) 1995 Graham Barr. All rights reserved. This program is free
+# Copyright (c) 1995-2009 Graham Barr. This program is free
 # software; you can redistribute it and/or modify it under the same terms
 # as Perl itself.
 
@@ -17,7 +15,7 @@
 @ISA = qw(Exporter);
 @EXPORT = qw(&strtotime &str2time &strptime);
 
-$VERSION = "2.27";
+$VERSION = "2.29";
 
 my %month = (
 	january		=> 0,
@@ -86,19 +84,20 @@
   # ignore day names
   $dtstr =~ s#([\d\w\s])[\.\,]\s#$1 #sog;
   $dtstr =~ s/,/ /g;
-  $dtstr =~ s#($daypat)\s*(den\s)?# #o;
+  $dtstr =~ s#($daypat)\s*(den\s)?\b# #o;
   # Time: 12:00 or 12:00:00 with optional am/pm
 
   return unless $dtstr =~ /\S/;
   
-  if ($dtstr =~ s/\s(\d{4})([-:]?)(\d\d?)\2(\d\d?)(?:[Tt ](\d\d?)(?:([-:]?)(\d\d?)(?:\6(\d\d?)(?:[.,](\d+))?)?)?)?(?=\D)/ /) {
+  if ($dtstr =~ s/\s(\d{4})([-:]?)(\d\d?)\2(\d\d?)(?:[-Tt ](\d\d?)(?:([-:]?)(\d\d?)(?:\6(\d\d?)(?:[.,](\d+))?)?)?)?(?=\D)/ /) {
     ($year,$month,$day,$hh,$mm,$ss,$frac) = ($1,$3-1,$4,$5,$7,$8,$9);
   }
 
   unless (defined $hh) {
-    if ($dtstr =~ s#[:\s](\d\d?):(\d\d?)(:(\d\d?)(?:\.\d+)?)?\s*(?:([ap])\.?m?\.?)?\s# #o) {
-      ($hh,$mm,$ss) = ($1,$2,$4 || 0);
-      $merid = $ampm{$5} if $5;
+    if ($dtstr =~ s#[:\s](\d\d?):(\d\d?)(:(\d\d?)(?:\.\d+)?)?(z)?\s*(?:([ap])\.?m?\.?)?\s# #o) {
+      ($hh,$mm,$ss) = ($1,$2,$4);
+      $zone = 0 if $5;
+      $merid = $ampm{$6} if $6;
     }
 
     # Time: 12 am
@@ -139,6 +138,9 @@
     }
     elsif ($dtstr =~ s#($monpat)\s*(\d+)\s*($sufpat)?\s# #o) {
       ($month,$day) = ($month{$1},$2);
+    }
+    elsif ($dtstr =~ s#($monpat)([\/-])(\d+)[\/-]# #o) {
+      ($month,$day) = ($month{$1},$3);
     }
 
     # Date: 961212
@@ -259,7 +261,7 @@
  if (defined $zone) {
    $result = eval {
      local $SIG{__DIE__} = sub {}; # Ick!
-     timegm($ss,$mm,$hh,$day,$month,$year);
+     timegm($ss,$mm,$hh,$day,$month,$year+1900);
    };
    return undef
      if !defined $result
@@ -271,7 +273,7 @@
  else {
    $result = eval {
      local $SIG{__DIE__} = sub {}; # Ick!
-     timelocal($ss,$mm,$hh,$day,$month,$year);
+     timelocal($ss,$mm,$hh,$day,$month,$year+1900);
    };
    return undef
      if !defined $result
@@ -322,7 +324,7 @@
 
 =head1 MULTI-LANGUAGE SUPPORT
 
-Date::Parse is capable of parsing dates in several languages, these are
+Date::Parse is capable of parsing dates in several languages, these include
 English, French, German and Italian.
 
 	$lang = Date::Language->new('German');
@@ -346,8 +348,9 @@
 
 =head1 LIMITATION
 
-Date::Parse uses Time::Local internally, so is limited to only parsing dates
-which result in valid values for Time::Local::timelocal
+Date::Parse uses L<Time::Local> internally, so is limited to only parsing dates
+which result in valid values for Time::Local::timelocal. This generally means dates
+between 1901-12-17 00:00:00 GMT and 2038-01-16 23:59:59 GMT
 
 =head1 BUGS
 
@@ -369,11 +372,9 @@
 
 =head1 COPYRIGHT
 
-Copyright (c) 1995 Graham Barr. All rights reserved. This program is free
+Copyright (c) 1995-2009 Graham Barr. This program is free
 software; you can redistribute it and/or modify it under the same terms
 as Perl itself.
 
 =cut
 
-# $Id: //depot/TimeDate/lib/Date/Parse.pm#22 $
-

Modified: trunk/libtimedate-perl/lib/Time/Zone.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtimedate-perl/lib/Time/Zone.pm?rev=47127&op=diff
==============================================================================
--- trunk/libtimedate-perl/lib/Time/Zone.pm (original)
+++ trunk/libtimedate-perl/lib/Time/Zone.pm Fri Nov 13 22:38:37 2009
@@ -20,7 +20,7 @@
 This is a collection of miscellaneous timezone manipulation routines.
 
 C<tz2zone()> parses the TZ environment variable and returns a timezone
-string suitable for inclusion in L<date>-like output.  It opionally takes
+string suitable for inclusion in L<date(1)>-like output.  It opionally takes
 a timezone string, a time, and a is-dst flag.
 
 C<tz_local_offset()> determins the offset from GMT time in seconds.  It
@@ -48,7 +48,7 @@
 
 @ISA = qw(Exporter);
 @EXPORT = qw(tz2zone tz_local_offset tz_offset tz_name);
-$VERSION = "2.22";
+$VERSION = "2.24";
 
 # Parts stolen from code by Paul Foley <paul at ascent.com>
 
@@ -156,17 +156,21 @@
 	    "cdt"  =>   -5*3600,  	 # Central Daylight
 	    "mdt"  =>   -6*3600,  	 # Mountain Daylight
 	    "pdt"  =>   -7*3600,  	 # Pacific Daylight
+	    "akdt" =>   -8*3600,         # Alaska Daylight
 	    "ydt"  =>   -8*3600,  	 # Yukon Daylight
 	    "hdt"  =>   -9*3600,  	 # Hawaii Daylight
 	    "bst"  =>   +1*3600,  	 # British Summer   
 	    "mest" =>   +2*3600,  	 # Middle European Summer   
+	    "metdst" => +2*3600, 	 # Middle European DST
 	    "sst"  =>   +2*3600,  	 # Swedish Summer
 	    "fst"  =>   +2*3600,  	 # French Summer
             "cest" =>   +2*3600,         # Central European Daylight
             "eest" =>   +3*3600,         # Eastern European Summer
+            "msd"  =>   +4*3600,         # Moscow Daylight
 	    "wadt" =>   +8*3600,  	 # West Australian Daylight
 	    "kdt"  =>  +10*3600,	 # Korean Daylight
 	#   "cadt" =>  +10*3600+1800,	 # Central Australian Daylight
+	    "aedt" =>  +11*3600,  	 # Eastern Australian Daylight
 	    "eadt" =>  +11*3600,  	 # Eastern Australian Daylight
 	    "nzd"  =>  +13*3600,  	 # New Zealand Daylight   
 	    "nzdt" =>  +13*3600,  	 # New Zealand Daylight   
@@ -194,6 +198,7 @@
 	    "cst"       =>  -6*3600,	 # Central Standard
 	    "mst"       =>  -7*3600,	 # Mountain Standard
 	    "pst"       =>  -8*3600,	 # Pacific Standard
+	    "akst"      =>  -9*3600,     # Alaska Standard
 	    "yst"	=>  -9*3600,	 # Yukon Standard
 	    "hst"	=> -10*3600,	 # Hawaii Standard
 	    "cat"	=> -10*3600,	 # Central Alaska
@@ -211,6 +216,7 @@
 	    "eet"	=>  +2*3600, 	 # Eastern Europe, USSR Zone 1
 	    "ukr"	=>  +2*3600, 	 # Ukraine
 	    "bt"	=>  +3*3600, 	 # Baghdad, USSR Zone 2
+            "msk"       =>  +3*3600,     # Moscow
 	#   "it"	=>  +3*3600+1800,# Iran
 	    "zp4"	=>  +4*3600, 	 # USSR Zone 3
 	    "zp5"	=>  +5*3600, 	 # USSR Zone 4
@@ -226,6 +232,7 @@
 	    "jst"	=>  +9*3600,	 # Japan Standard, USSR Zone 8
 	    "kst"	=>  +9*3600,	 # Korean Standard
 	#   "cast"	=>  +9*3600+1800,# Central Australian Standard
+	    "aest"	=> +10*3600,	 # Eastern Australian Standard
 	    "east"	=> +10*3600,	 # Eastern Australian Standard
 	    "gst"	=> +10*3600,	 # Guam Standard, USSR Zone 9
 	    "nzt"	=> +12*3600,	 # New Zealand

Modified: trunk/libtimedate-perl/t/date.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtimedate-perl/t/date.t?rev=47127&op=diff
==============================================================================
--- trunk/libtimedate-perl/t/date.t (original)
+++ trunk/libtimedate-perl/t/date.t Fri Nov 13 22:38:37 2009
@@ -5,6 +5,13 @@
 
 $data = qq!1995-01-24
 1995-01-24T09:08:17.1823213
+- 1935-01-24T09:08:17
+- Fri Dec 17 00:00:00 1901 GMT
+Tue Jan 16 23:59:59 2038 GMT
+2001-02-02 00:00:00 GMT
+2035-02-02 00:00:00 GMT
+- 16 Jun 33 07:29:35 CST 
+2002-02-26-10:37:21.141 GMT
 Wed, 16 Jun 94 07:29:35 CST 
 Wed, 16 Nov 94 07:29:35 CST 
 Mon, 21 Nov 94 07:42:23 CST 
@@ -30,6 +37,10 @@
 21-dec 17:05
 21/dec 17:05
 21/dec/93 17:05
+dec/21/93 17:05
+Dec/21/1993 17:05:00
+dec-21-1993 17:05
+Dec-21-93 17:05:00
 dec 21 1994 17:05
 dec 21 94 17:05
 dec 21 94 17:05 GMT
@@ -126,6 +137,19 @@
 Tue, 15 Nov 1994 13:11:47 -0800 
 Tue, 15 Nov 1994 13:18:38 -0800 
 Tue, 15 Nov 1994 0:18:38 -0800 
+10:00:00Z
+10:00:00
+10:00
+10:00 +100
+10:00 +0100
+20020722T100000Z
+Jul 22 10:00:00 UTC 2002
+2002-07-22 10:00:00Z
+2002-07-22 10:00:00 Z
+2002-07-22 10:00 Z
+2002-07-22 10:00Z
+2002-07-22 10:00 +100
+2002-07-22 10:00 +0100
 !;
 
 @data = split(/\n/, $data);
@@ -138,10 +162,19 @@
 
 foreach (@data)
 {
- $time = int str2time($_);
+ my $pre_1970 = s/^-\s*//;
+
+ if ($pre_1970 and $^O eq "MSWin32") {
+   print "ok ",$loop++," # skip\n";
+   next;
+ }
+
+ $time = str2time($_);
 
  if(defined $time)
   {
+   $time = int $time;
+
    $x = time2str("%a %b %e %T %Y %Z",$time,'GMT');
 
    printf "%-40s\t%s\n", $_,$x,"\n";

Modified: trunk/libtimedate-perl/t/getdate.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtimedate-perl/t/getdate.t?rev=47127&op=diff
==============================================================================
--- trunk/libtimedate-perl/t/getdate.t (original)
+++ trunk/libtimedate-perl/t/getdate.t Fri Nov 13 22:38:37 2009
@@ -19,6 +19,7 @@
 1995-06-24  GMT                      ;803952000
 1995-06-24  BST                      ;803948400
 1992-1-2 12:01 GMT		     ;694353660
+1992-1-2-12:01:00 GMT		     ;694353660
 Wed, 16 Jun 94 07:29:35 CST    	     ;771773375
 Wed,16 Jun 94 07:29:35 CST    	     ;771773375
 Wed, 16 Nov 94 07:29:35 CST 	     ;784992575
@@ -132,6 +133,8 @@
 Jul 13 1999 1:23P GMT		     ;931872180
 Jul 13 1999 1:23P.M GMT		     ;931872180
 Jul 13 1999 1:23P.M. GMT	     ;931872180
+Jul-13-1999 1:23P.M GMT		     ;931872180
+Jul/13/1999 1:23P.M. GMT	     ;931872180
 2001-02-26T13:44:12-0700	     ;983220252
 2001-02-26T13:44-0700		     ;983220240
 2001-02-26T13-0700		     ;983217600
@@ -142,6 +145,14 @@
 2002-11-07T23:31:49-05:00	     ;1036729909
 2003-02-17T07:45:56Z		     ;1045467956
 2003-02-17T08:14:07.198189+0000	     ;1045469647.198189
+20020722T100000Z		     ;1027332000
+Jul 22 10:00:00 UTC 2002	     ;1027332000
+2002-07-22 10:00:00Z		     ;1027332000
+2002-07-22 10:00:00 Z		     ;1027332000
+2002-07-22 10:00 Z		     ;1027332000
+2002-07-22 10:00Z		     ;1027332000
+2002-07-22 10:00 +100		     ;1027328400
+2002-07-22 10:00 +0100		     ;1027328400
 !;
 
 require Time::Local;




More information about the Pkg-perl-cvs-commits mailing list