dragonchild has asked for the wisdom of the Perl Monks concerning the following question:
Based on a given value in a table row, set the background color. I want to compare that value to the current day and, if it's after today, set it to green, otherwise set it to red.
I want to do this in the template itself, so I thought I would use the Date plugin. Now, I'm not a master of the date modules, but Date::Calc::Object looks like it will do what I want with its overloaded operators, but I cannot seem to find a way of having the Date plugin to TT use it.
Date::Calc doesn't have a date comparison operator and Date::Manip doesn't look like it does.
------
We are the carpenters and bricklayers of the Information Age.
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Template Toolkit and Date plugin
by adrianh (Chancellor) on Apr 30, 2004 at 16:06 UTC | |
|
Re: Template Toolkit and Date plugin
by perrin (Chancellor) on Apr 30, 2004 at 17:26 UTC | |
by dragonchild (Archbishop) on Apr 30, 2004 at 17:35 UTC | |
by perrin (Chancellor) on Apr 30, 2004 at 18:40 UTC |