I think you need to read the
Date::Calc documentation a little better. You are misusing the Today function; it takes a boolean parameter saying whether to return today's date according to your local time zone or according to universal time, not an array reference.
It also has a RECIPES section, with the very first example being comparing two dates. I think you want:
if (Delta_Days(Today(0), $year, $month, $day) == 0)
or, being perhaps a little more efficient, outside your formatting loops, say:
$today_in_days = Date_to_Days(Today(0));
and then,
if ($today_in_days == Date_to_Days($year, $month, $day))
Use Today(1) instead to use universal time instead of your server's local time to determine today's date.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.