|
From: Chris W. <la...@us...> - 2001-10-22 15:13:06
|
Update of /cvsroot/openinteract/SPOPS/SPOPS
In directory usw-pr-cvs1:/tmp/cvs-serv2013
Modified Files:
Utility.pm
Log Message:
added version of now() with Class::Date
Index: Utility.pm
===================================================================
RCS file: /cvsroot/openinteract/SPOPS/SPOPS/Utility.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** Utility.pm 2001/10/12 21:00:26 1.12
--- Utility.pm 2001/10/22 15:13:03 1.13
***************
*** 4,7 ****
--- 4,8 ----
use strict;
+ use Class::Date qw();
use Date::Format qw( time2str );
use Date::Calc ();
***************
*** 44,48 ****
#
# Signature: $time_string = $class->now( [ { format => $strftime_format,
! # time => $time_in_seconds } ] );
sub now {
--- 45,49 ----
#
# Signature: $time_string = $class->now( [ { format => $strftime_format,
! # time => $time_in_seconds } ] );
sub now {
***************
*** 52,55 ****
--- 53,65 ----
return time2str( $p->{format}, $p->{time} );
}
+
+
+ # Class::Date version...
+ #sub now {
+ # my ( $class, $p ) = @_;
+ # $p->{format} ||= '%Y-%m-%d %T';
+ # $p->{time} ||= time;
+ # return Class::Date::new( $p->{time} )->strftime( $p->{format} );
+ #}
|