Ya know it takes some time to respond to Threads...Posting numerous "please help" messages in a twelve hour period is annoying...Sorry.
Anyway...Okay...what you have to do is leave the
date => \&Links::DBSQL::get_date,. Then you have to edit the
sub get_date in the
DBSQL.pm module.
Like the following:
Code:
sub get_date {
# ---------------------------------------------------------------
# Return todays date (self may or may not be an object).
#
my $self = shift;
ref $self ? return &_unix_to_page_date (@_) : return &_unix_to_page_date ($self);
} Then add a subroutine called
sub _unix_to_page_date in the same module file:
Code:
sub _unix_to_page_date {
# --------------------------------------------------------
# Private method to translate a unix time value into a date.
#
my $time = shift || time;
($time =~ /^\d+$/) or ($time = time);
my ($sec, $min, $hour, $day, $mon, $year, $dweek, $dyear, $tz) = localtime $time;
$year = $year + 1900;
$mon++;
my %months = qw!01 January 02 February 03 March 04 April 05 May 06 June 07 July 08 August 09 September 10 October 11 November 12 December!;
($mon < 10) and ($mon = "0" . int $mon); ($day < 10) and ($day = "0" . int $day);
return "$months{$mon} $day, $year";
} You can edit the
@months array and also the format of the date by editing the
return line. Unfortunately, referencing the
convert_date subs you created will not work because of the
int function.
Regards,
Eliot