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
A smarty variable question...
Re: A smarty variable question...
Try the smarty modificator "concat" (concatenate).
This will stick several strings together.
If you assign the output of concat to a variable you can compare the two date strings.
This will stick several strings together.
If you assign the output of concat to a variable you can compare the two date strings.
Re: A smarty variable question...
Thank you - that did the trick!
Re: A smarty variable question...
Ok after 100 some post you must know by now to put [solved] in the subject line of first post...