• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 292
  • Last Modified:

Date::Format and having the template

http://search.cpan.org/~gbarr/TimeDate-1.20/lib/Date/Format.pm

I copied in the example from Date::Format below. So where do I get $template from? It says nothing about that.
use Date::Format;
        
        @lt = localtime(time);
        
        print time2str($template, time);
        print strftime($template, @lt);
        
        print time2str($template, time, $zone);
        print strftime($template, @lt, $zone);
        
        print ctime(time);
        print asctime(@lt);
        
        print ctime(time, $zone);
        print asctime(@lt, $zone);

Open in new window

0
itnifl
Asked:
itnifl
1 Solution
 
FishMongerCommented:
You write/build your template using the characters detailed in the CONVERSION SPECIFICATION section of the module documentation.

http://search.cpan.org/~gbarr/TimeDate-1.20/lib/Date/Format.pm#CONVERSION_SPECIFICATION
0
 
itniflAuthor Commented:
Yup, that easy ;)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now