[wellwell] Apply format if provided in [datetime] tag.

Stefan Hornburg interchange-cvs at icdevgroup.org
Fri Aug 31 06:02:09 UTC 2018


commit e496efbfb5f612d87ec27e6e11d7f5c8cda300ab
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date:   Fri Aug 31 08:01:14 2018 +0200

    Apply format if provided in [datetime] tag.

 global/datetime.tag |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/global/datetime.tag b/global/datetime.tag
index 46cb568..0c47ea3 100644
--- a/global/datetime.tag
+++ b/global/datetime.tag
@@ -267,6 +267,11 @@ sub {
 		return $from_dt->year();
 	}
 
+    # apply format if provided
+    if ($fmt) {
+        return $from_dt->strftime($fmt);
+    }
+
 	# just return DateTime object when called without function
 	return $from_dt;
 }



More information about the interchange-cvs mailing list