Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by dkubb (Deacon)
on May 14, 2001 at 09:00 UTC ( #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? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2022-12-05 10:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?