Gossamer Forum
Quote Reply
*REALLY* annoying bug :/
Hi,

Not sure if anyone else has encountered this problem - but I'm having a hell of a time with dates in the templates :(

If we pass in a date - i.e 2007-10-21 , it AUTOMATICALLY gets converted into the %ddd% %mmm% %dd% %yyyy% format.

This is a real PITA on the current plugin I'm working on (I've managed to get around it, but I'm not happy at the way I've had to do it :()

I basically had to convert dates being passed into the template - so:

2007-10-21

..becomes:

2007 - 10 - 21

Then, pass it BACK to a function, to replace the - to normal - i.e:

Code:
sub {

my $date = $_[0];
$date =~ s/ - /-/sig;
return $date;

}

Surely there has to be a better way than this? Not very elegant at all - although it does work now (which is something)

TIA

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Subject Author Views Date
Thread *REALLY* annoying bug :/ Andy 2530 Jan 10, 2008, 8:48 AM
Thread Re: [Andy] *REALLY* annoying bug :/
gotze 2412 Jan 11, 2008, 1:00 PM
Post Re: [gotze] *REALLY* annoying bug :/
Andy 2416 Jan 12, 2008, 2:00 AM