Gossamer Forum
Home : Products : Gossamer Links : Discussions :

GT::Date question

Quote Reply
GT::Date question
I am trying to get the current datetime. I use the following command for formating:
Code:
GT::Date::date_set_format('%yyyy%-%mm%-%dd% %hh%:%mm%:%ss%');
Following the format listed in the GT help file:
Code:
%yyyy% four digit year as in 1999
%yy% two digit year as in 99
%mmmm% long month name as in January
%mmm% short month name as in Jan
%mm% numerical month name as in 01
%dddd% long day name as in Sunday
%ddd% short day name as in Sun
%dd% numerical date
%hh% two digit hour
%mm% two digit minute
%ss% two digit second
Unfortunately, it seems either I am not understanding the format to get the minutes (%mm%), or it is the same as the numerical month (which seems to be the problem).

In either case, I keep getting 02 for my %mm% minutes, which is the current month.

Is this a problem with me? a typo in the docs, or a bug in the module?

Thanks for any help....

AlexJ

Quote Reply
Re: GT::Date Answer In reply to
Looks like the docs are a bit off...

By digging through the module code, I was able to see where uppercase %MM% should be used for minutes.

And that works just fine...

AlexJ