[Rt-commit] r5156 - in rt/branches/3.7-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Wed May 3 17:55:13 EDT 2006
Author: ruz
Date: Wed May 3 17:55:12 2006
New Revision: 5156
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/lib/RT/Date.pm
Log:
r2815 at cubic-pc: cubic | 2006-05-04 01:03:18 +0400
* doc + defined check
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Date.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Date.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Date.pm Wed May 3 17:55:12 2006
@@ -281,7 +281,8 @@
=head2 Diff
-Takes either an RT::Date object or the date in unixtime format as a string
+Takes either an RT::Date object or the date in unixtime format as a string, if
+nothing is specified uses the current time.
Returns the differnce between $self and that time as a number of seconds
@@ -289,7 +290,8 @@
sub Diff {
my $self = shift;
- my $other = shift || time;
+ my $other = shift
+ $other = time unless defined $other;
if ( UNIVERSAL::isa( $other, 'RT::Date' ) ) {
$other = $other->Unix;
More information about the Rt-commit
mailing list