A smarty variable question...
Posted: Mon Jul 27, 2009 6:11 pm
I have some smarty template vars like this:
{$day} {$month_names.$month} {$year}
This just constructs a date: 02 July 2009 (each is a separarate var)
I need to compare this date with another date. The second date is a string: "2 July 2009" but the one above is day month year. How can I compare them? I was thinking that I could chnage the D M Y 'bits' into a string but I can see a way to do this using smarty!
The application is this: a list of events retrieved from the calendar module and listed on a page. I need to be able to compare each event to a set date and then do something. I'm at a loss as to how I can achieve this at the mo'.
Can anyone guide me?
Sarah
{$day} {$month_names.$month} {$year}
This just constructs a date: 02 July 2009 (each is a separarate var)
I need to compare this date with another date. The second date is a string: "2 July 2009" but the one above is day month year. How can I compare them? I was thinking that I could chnage the D M Y 'bits' into a string but I can see a way to do this using smarty!
The application is this: a list of events retrieved from the calendar module and listed on a page. I need to be able to compare each event to a set date and then do something. I'm at a loss as to how I can achieve this at the mo'.
Can anyone guide me?
Sarah