Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

(dkubb) Re: (2) formatting integers for printing

by dkubb (Deacon)
on May 14, 2001 at 09:00 UTC ( [id://80145]=note: print w/replies, xml ) Need Help??


in reply to formatting integers for printing

++tilly on the ISO date advocacy post.

I'm not a big fan of using sprintf or other home-grown methods for formatting date strings. IMHO, it's much cleaner to use CPAN's Date::Format module. You get clearer code, and more consistent results:

#!/usr/bin/perl -w use strict; use Date::Format; my $iso_date = time2str '%Y-%m-%d', time;

This will return the date in ISO format: YYYY-MM-DD

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-19 22:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found