[Rt-commit] r18652 - in rt/3.999/trunk: .
sartak at bestpractical.com
sartak at bestpractical.com
Tue Mar 3 22:01:10 EST 2009
Author: sartak
Date: Tue Mar 3 22:01:10 2009
New Revision: 18652
Modified:
rt/3.999/trunk/ (props changed)
rt/3.999/trunk/lib/RT/DateTime.pm
Log:
r80879 at onn: sartak | 2009-03-03 22:01:02 -0500
iso(date => 0) etc
Modified: rt/3.999/trunk/lib/RT/DateTime.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/DateTime.pm (original)
+++ rt/3.999/trunk/lib/RT/DateTime.pm Tue Mar 3 22:01:10 2009
@@ -73,7 +73,24 @@
sub iso {
my $self = shift;
- join ' ', $self->ymd('-'), $self->hms(':');
+ my %args = (
+ date => 1,
+ time => 1,
+ @_,
+ );
+
+ if ($args{time} && $args{date}) {
+ return join ' ', $self->ymd('-'), $self->hms(':');
+ }
+ elsif ($args{date}) {
+ return $self->ymd('-');
+ }
+ elsif ($args{time}) {
+ return $self->hms(':');
+ }
+ else {
+ return '';
+ }
}
1;
More information about the Rt-commit
mailing list