Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2017-10-17 13:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (232 votes). Check out past polls.

    Notices?