Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
jeffa steps up to the podium

[feedback] testing ... is this thing on? ahem. Manipulating dates in Perl is a common task, and it's no wonder that there are a plethora of date modules in the Date namespace. As you can see in the following Power Point slide [show slide that makes the Bioperl Class Diagram look easy], determining which Date module to use is quite a chore. All of that just to find a date. Enter Acme::Current.

Acme::Current seeks to [feedback] (can that be fixed?) ... anyhoo, it seeks to eliminate the complexity associated with determining the current date. I installed the module on my box yesterday, let's test it out:
use Acme::Current; printf "It's now %04d/%02d/%02d.\n", $Acme::Current::YEAR, $Acme::Current::MONTH, $Acme::Current::DAY ;
And when run, this yields:
It's now 2003/07/15.
Uh oh. Today is the 16th (is today the 16th?). Yes it appears to be the 16th. [shuffles notes] Ummmm. help. [shuffles notes ... feedback]. Aha! I forgot to update the module today! [installs module again].

There, let's run that code again:

use Acme::Current; printf "It's now %04d/%02d/%02d.\n", $Acme::Current::YEAR, $Acme::Current::MONTH, $Acme::Current::DAY ;
and we get the current date:
It's now 2003/07/16.
In conclusion, as long as you keep Acme::Current up to date (a scheduled cron job should do the trick), Acme::Current will keep you up to date with the current date ... as long as you don't mind that date being GMT, or course. Thank you.

[feedback]


In reply to Acme::Current by jeffa

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-18 13:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found