[interchange-cvs] interchange - racke modified 2 files

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Thu Jan 29 10:47:40 UTC 2009


User:      racke
Date:      2009-01-29 10:47:40 GMT
Modified:  .        WHATSNEW-5.7
Modified:  code/UserTag convert_date.tag
Log:
Added empty attribute for [convert-date] to display a custom string
instead of the current date when no proper date is passed.

Revision  Changes    Path
2.26                 interchange/WHATSNEW-5.7


rev 2.26, prev_rev 2.25
Index: WHATSNEW-5.7
===================================================================
RCS file: /var/cvs/interchange/WHATSNEW-5.7,v
retrieving revision 2.25
retrieving revision 2.26
diff -u -r2.25 -r2.26
--- WHATSNEW-5.7	28 Jan 2009 07:38:26 -0000	2.25
+++ WHATSNEW-5.7	29 Jan 2009 10:47:40 -0000	2.26
@@ -37,6 +37,9 @@
 
 * [run-profile] now accepts ref attribute to check an arbitrary hash.
 
+* Added empty attribute for [convert-date] to display a custom string
+  instead of the current date when no proper date is passed.
+
 Checks
 ------
 



1.8                  interchange/code/UserTag/convert_date.tag


rev 1.8, prev_rev 1.7
Index: convert_date.tag
===================================================================
RCS file: /var/cvs/interchange/code/UserTag/convert_date.tag,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- convert_date.tag	30 Mar 2007 23:40:56 -0000	1.7
+++ convert_date.tag	29 Jan 2009 10:47:40 -0000	1.8
@@ -5,7 +5,7 @@
 # the Free Software Foundation; either version 2 of the License, or
 # (at your option) any later version.  See the LICENSE file for details.
 # 
-# $Id: convert_date.tag,v 1.7 2007-03-30 23:40:56 pajamian Exp $
+# $Id: convert_date.tag,v 1.8 2009-01-29 10:47:40 racke Exp $
 
 UserTag convert-date Order       adjust
 UserTag convert-date PosNumber   1
@@ -14,7 +14,7 @@
 UserTag convert-date AttrAlias   days adjust
 UserTag convert-date HasEndTag
 UserTag convert-date Interpolate
-UserTag convert-date Version     $Revision: 1.7 $
+UserTag convert-date Version     $Revision: 1.8 $
 UserTag convert-date Routine     <<EOR
 sub {
     my ($adjust, $opt, $text) = @_;
@@ -43,6 +43,9 @@
 					$t[5] = $1;
 					$t[5] -= 1900;
 	}
+	elsif (exists $opt->{empty}) {
+		return $opt->{empty};
+	}
 	else {
 					$now = time();
 					@t = localtime($now) unless $adjust;







More information about the interchange-cvs mailing list