develooper Front page | perl.perl6.language | Postings from May 2005

Re: date and time formatting

Thread Previous
David Storrs
May 31, 2005 11:34
Re: date and time formatting
Message ID:
On May 31, 2005, at 2:22 PM, Rob Kinyon wrote:
>>      my ($launch_date = now() + 6 weeks) but time(9am);
> Sure. $launch_date is of type DateTime. It will numify to the
> seconds-since-the-epoch, stringify to some date string, and provide
> all the neat-o-keen methods you want it to have.

Works for me.

> Frankly, I think we're in violent agreement here.

Sounds like it.  I don't really care if it's built in or comes in a  
module.  I do think that date manipulation is common enough that, if  
it's in a module, the module should come in the "basic set".

I met a guy once who made his living doing Java programming.  I asked  
him what he liked about Java and he said "Nothing.  I hate it. I only  
do it because it pays."  He then went on to list the reasons he hated  
it--high on the list was that Java is not good at date manipulation.   
Personally, I've done so little Java that I can't really speak to the  
accuracy of his statements, but the message has stuck with me--date  
manipulation is important, and needs to be got right.

To put it another way--it's one of those hard things that Perl 6 is  
trying to make easy.


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About