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: 77841
Status: resolved
Priority: 0/
Queue: DateTime

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

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



Subject: [Suggestion] Allow for two digit numeric months
Date: Fri, 15 Jun 2012 11:49:21 -0400
To: bug-datetime [...] rt.cpan.org
From: Adam Jimerson <vendion [...] gmail.com>
This is more of a wishlist item than anything else, but when getting the numeric month from a DateTime object there is a way to get the two digit month so that January is returned as '01' instead of as '1' like what happens when $dt->month is called. I know this is pretty trivial after the fact but in still would be nice to have.
Subject: Re: [rt.cpan.org #77841] [Suggestion] Allow for two digit numeric months
Date: Fri, 15 Jun 2012 10:53:33 -0500 (CDT)
To: Adam Jimerson via RT <bug-DateTime [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Fri, 15 Jun 2012, Adam Jimerson via RT wrote: Show quoted text
> This is more of a wishlist item than anything else, but when getting the > numeric month from a DateTime object there > is a way to get the two digit month so that January is returned as '01' > instead of as '1' like what happens when $dt->month > is called. I know this is pretty trivial after the fact but in still would > be nice to have.
$dt->format_cldr('MM'); -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/