[Rt-commit] r17876 - in rt/3.8/trunk: .
falcone at bestpractical.com
falcone at bestpractical.com
Wed Jan 21 17:26:33 EST 2009
Author: falcone
Date: Wed Jan 21 17:26:33 2009
New Revision: 17876
Modified:
rt/3.8/trunk/ (props changed)
rt/3.8/trunk/lib/RT/Date.pm
Log:
r43781 at ketch: falcone | 2009-01-21 17:26:00 -0500
* Add the ability to hide Seconds in the DefaultFormat date display
Modified: rt/3.8/trunk/lib/RT/Date.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Date.pm (original)
+++ rt/3.8/trunk/lib/RT/Date.pm Wed Jan 21 17:26:33 2009
@@ -589,6 +589,7 @@
my %args = ( Date => 1,
Time => 1,
Timezone => '',
+ Seconds => 1,
@_,
);
@@ -603,11 +604,21 @@
return $self->loc('[_1] [_2] [_3] [_4]',
$wday,$mon,$mday,$year);
} elsif( !$args{'Date'} && $args{'Time'} ) {
- return $self->loc('[_1]:[_2]:[_3]',
- $hour,$min,$sec);
+ if( $args{'Seconds'} ) {
+ return $self->loc('[_1]:[_2]:[_3]',
+ $hour,$min,$sec);
+ } else {
+ return $self->loc('[_1]:[_2]',
+ $hour,$min);
+ }
} else {
- return $self->loc('[_1] [_2] [_3] [_4]:[_5]:[_6] [_7]',
- $wday,$mon,$mday,$hour,$min,$sec,$year);
+ if( $args{'Seconds'} ) {
+ return $self->loc('[_1] [_2] [_3] [_4]:[_5]:[_6] [_7]',
+ $wday,$mon,$mday,$hour,$min,$sec,$year);
+ } else {
+ return $self->loc('[_1] [_2] [_3] [_4]:[_5] [_6]',
+ $wday,$mon,$mday,$hour,$min,$year);
+ }
}
}
More information about the Rt-commit
mailing list