I was unaware of Acme::September::Eternal until today. A couple of years ago in my ignorance I wrote a little script to perform essentially the same task, albeit just for the current date.
Looking into the source we can see that Acme::September::Eternal makes use of Date::Manip (as you mention) and Lingua::EN::Numbers::Ordinate whereas my solution is based on Time::Piece and Lingua::EN::Inflexion. Mechanical details aside, they are practically the same. TIMTOWTDI indeed.
Here is a redacted version of mine, for anyone interested.
#!/usr/bin/env perl
use strict;
use warnings;
use Time::Piece;
use Lingua::EN::Inflexion 'inflect';
my $now = localtime;
my $then = Time::Piece->strptime ('1993-08-31', '%Y-%m-%d');
my $diff = $now - $then;
$diff = int ($diff / 86400);
my $day = inflect ("<#o:$diff>");
print "Today is the $day of September 1993\n";
exit;
-
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.
|