[Rt-devel] Short Date Format

Stephen Cochran stephen.a.cochran.lists at cahir.net
Mon Apr 14 00:53:30 EDT 2008


To enable due dates entry in the SelfService interface and while viewing the
basics of a ticket, I've made a number of modifications. One is to the
Date.pm file itself to enable a "Short" version. The diff is below:

diff Date.pm.dist Date.pm
404a405,422
> # {{{ sub AsShortString
>
> =head2 sub AsShortString
>
> Returns the object\'s time as a string with only the date, no time.
>
> =cut
>
> sub AsShortString {
>     my $self = shift;
>     return ($self->loc("Not set")) if ($self->Unix <= 0);
>
>     my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime($self->Unix);
>
>     return $self->loc("[_1] [_2] [_3]", $self->GetWeekday($wday),
$self->GetMonth($mon), ($year+1900));
> }
> # }}}
>

Is there a process for submitting patches?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bestpractical.com/pipermail/rt-devel/attachments/20080414/844a225f/attachment.htm 


More information about the Rt-devel mailing list