Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: DateTime normalize

by Herkum (Parson)
on Aug 26, 2009 at 03:26 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://791233]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-24 14:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found