Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DateTime-Locale CPAN distribution.

Report information
The Basics
Id: 50372
Status: resolved
Priority: 0/
Queue: DateTime-Locale

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Incorrect CLDR->Strftime translation
Date: Fri, 9 Oct 2009 17:45:59 -0400
To: bug-datetime-locale [...] rt.cpan.org
From: Kevin Falcone <falcone [...] bestpractical.com>
An option RT feature uses DateTime::Locale to allow users to better control their date formatting. It was developed against an older DateTime::Locale and thus uses full_date_format rather than date_format_full. Unfortunately, in 0.44 (and cldr 1.7.1), the en definition of full_date_format changed: - my $date_format_full = "EEEE\,\ MMMM\ d\,\ yyyy"; + my $date_format_full = "EEEE\,\ MMMM\ d\,\ y"; If you feed cldr EEEE, MMMM d, y to $datetime->format_cldr you get a 4 digit year. Unfortunately, the DateTime::Locale::Base cldr to strftime function converst the single y into %y which is not a 4 digit year I've attached strftime_to_cldr.t which demonstrates the issue and a patch to Base.pm which changes the behavior. -kevin

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #50372] Incorrect CLDR->Strftime translation
Date: Fri, 9 Oct 2009 17:58:45 -0500 (CDT)
To: "falcone [...] bestpractical.com via RT" <bug-DateTime-Locale [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Fri, 9 Oct 2009, falcone@bestpractical.com via RT wrote: Show quoted text
> Unfortunately, in 0.44 (and cldr 1.7.1), the en definition of full_date_format changed: > > - my $date_format_full = "EEEE\,\ MMMM\ d\,\ yyyy"; > + my $date_format_full = "EEEE\,\ MMMM\ d\,\ y"; > > If you feed cldr EEEE, MMMM d, y to $datetime->format_cldr > you get a 4 digit year. > > Unfortunately, the DateTime::Locale::Base cldr to strftime function > converst the single y into %y which is not a 4 digit year > > I've attached strftime_to_cldr.t which demonstrates the issue and a > patch to Base.pm which changes the behavior.
The CLDR -> strftime has been deprecated, because it's not really possible to do it properly. The strftime formats only support a subset of CLDR. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
Subject: Re: [rt.cpan.org #50372] Incorrect CLDR->Strftime translation
Date: Fri, 9 Oct 2009 19:09:25 -0400
To: "autarch [...] urth.org via RT" <bug-DateTime-Locale [...] rt.cpan.org>
From: Kevin Falcone <falcone [...] bestpractical.com>
On Fri, Oct 09, 2009 at 06:59:03PM -0400, autarch@urth.org via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=50372 > > > On Fri, 9 Oct 2009, falcone@bestpractical.com via RT wrote: >
> > Unfortunately, in 0.44 (and cldr 1.7.1), the en definition of full_date_format changed: > > > > - my $date_format_full = "EEEE\,\ MMMM\ d\,\ yyyy"; > > + my $date_format_full = "EEEE\,\ MMMM\ d\,\ y"; > > > > If you feed cldr EEEE, MMMM d, y to $datetime->format_cldr > > you get a 4 digit year. > > > > Unfortunately, the DateTime::Locale::Base cldr to strftime function > > converst the single y into %y which is not a 4 digit year > > > > I've attached strftime_to_cldr.t which demonstrates the issue and a > > patch to Base.pm which changes the behavior.
> > The CLDR -> strftime has been deprecated, because it's not really possible > to do it properly. The strftime formats only support a subset of CLDR.
If the deprecated methods WARNed, I wouldn't have spent 3 hours trying to figure out if this was Snow Leopard's fault. -kevin
Subject: Re: [rt.cpan.org #50372] Incorrect CLDR->Strftime translation
Date: Fri, 9 Oct 2009 18:13:22 -0500 (CDT)
To: "falcone [...] bestpractical.com via RT" <bug-DateTime-Locale [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Fri, 9 Oct 2009, falcone@bestpractical.com via RT wrote: Show quoted text
>>> Unfortunately, in 0.44 (and cldr 1.7.1), the en definition of full_date_format changed: >>> >>> - my $date_format_full = "EEEE\,\ MMMM\ d\,\ yyyy"; >>> + my $date_format_full = "EEEE\,\ MMMM\ d\,\ y"; >>> >>> If you feed cldr EEEE, MMMM d, y to $datetime->format_cldr >>> you get a 4 digit year. >>> >>> Unfortunately, the DateTime::Locale::Base cldr to strftime function >>> converst the single y into %y which is not a 4 digit year >>> >>> I've attached strftime_to_cldr.t which demonstrates the issue and a >>> patch to Base.pm which changes the behavior.
>> >> The CLDR -> strftime has been deprecated, because it's not really possible >> to do it properly. The strftime formats only support a subset of CLDR.
> > If the deprecated methods WARNed, I wouldn't have spent 3 hours trying > to figure out if this was Snow Leopard's fault.
Complaints without patches are, uh, welcome. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/