Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: DateTime normalize

by Herkum (Parson)
on Aug 26, 2009 at 03:26 UTC ( #791233=note: print w/replies, xml ) Need Help??


in reply to DateTime normalize

now() is a class method not a object method. When you call it with,

$result->now()

It assumes $result is the package and looks at it as a string. A DateTime object which is used in a string context returns the date in a iso8601 format(by default).

If you use it as a class method you should not see an error.

my $result = DateTime->now;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://791233]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2018-08-15 14:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (161 votes). Check out past polls.

    Notices?