[interchange-cvs] interchange - heins modified lib/Vend/Interpolate.pm
interchange-core@interchange.redhat.com
interchange-core@interchange.redhat.com
Thu Nov 15 20:01:00 2001
User: heins
Date: 2001-11-16 00:51:50 GMT
Modified: lib/Vend Interpolate.pm
Log:
* Graceful fallbacks for time formats.
Revision Changes Path
2.30 +3 -3 interchange/lib/Vend/Interpolate.pm
rev 2.30, prev_rev 2.29
Index: Interpolate.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.29
retrieving revision 2.30
diff -u -r2.29 -r2.30
--- Interpolate.pm 2001/11/15 00:53:04 2.29
+++ Interpolate.pm 2001/11/16 00:51:49 2.30
@@ -1,6 +1,6 @@
# Vend::Interpolate - Interpret Interchange tags
#
-# $Id: Interpolate.pm,v 2.29 2001/11/15 00:53:04 mheins Exp $
+# $Id: Interpolate.pm,v 2.30 2001/11/16 00:51:49 mheins Exp $
#
# Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
#
@@ -27,7 +27,7 @@
require Exporter;
@ISA = qw(Exporter);
-$VERSION = substr(q$Revision: 2.29 $, 10);
+$VERSION = substr(q$Revision: 2.30 $, 10);
@EXPORT = qw (
@@ -2985,7 +2985,7 @@
$now = $neg ? $now - $diff : $now + $diff;
}
- $fmt ||= '%c';
+ $fmt ||= $opt->{format} || $opt->{fmt} || '%c';
my $out = $opt->{gmt} ? ( POSIX::strftime($fmt, gmtime($now) ))
: ( POSIX::strftime($fmt, localtime($now) ));
$out =~ s/\b0(\d)\b/$1/g if $opt->{zerofix};