Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DateTime CPAN distribution.

Report information
The Basics
Id: 39923
Status: resolved
Priority: 0/
Queue: DateTime

People
Owner: Nobody in particular
Requestors: vynce.montgomery [...] gmail.com
Cc:
AdminCc:

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



Subject: Documentation typo
Date: Thu, 9 Oct 2008 09:13:13 -0700
To: bug-DateTime [...] rt.cpan.org
From: "Vynce Montgomery" <vynce.montgomery [...] gmail.com>
from http://search.cpan.org/~drolsky/DateTime-0.4305/lib/DateTime.pm = $dt->year_with_era() Returns a string containing the year immediately followed by its era abbreviation. The year is the absolute value of ce_year(), so that year 1 is "1BC" and year 0 is "1AD". = I think you mean 1 is "1AD" and 0 is "1BC". . Also, for whatever it's worth, technically the "AD" should go befor ethe year, as in "AD 1960" -- though that's falling out of the common use. .
Subject: Re: [rt.cpan.org #39923] Documentation typo
Date: Thu, 9 Oct 2008 11:42:10 -0500 (CDT)
To: Vynce Montgomery via RT <bug-DateTime [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Thu, 9 Oct 2008, Vynce Montgomery via RT wrote: Show quoted text
> = > > $dt->year_with_era() > > Returns a string containing the year immediately followed by its era > abbreviation. The year is the absolute value of ce_year(), so that > year 1 is "1BC" and year 0 is "1AD". > > = > > I think you mean 1 is "1AD" and 0 is "1BC".
Indeed. Show quoted text
> Also, for whatever it's worth, technically the "AD" should go befor > ethe year, as in "AD 1960" -- though that's falling out of the common > use.
These methods are really kind of hacky. If you want to do it the right way use DateTime::Locale to generate locale-specific formats of dates. Unfortunately, I don't think the locale information includes a format for "year with era" yet, but you could submit some patches to the CLDR project ;) -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/