Mailing List Archive

[wellwell] Apply format if provided in [datetime] tag.
commit e496efbfb5f612d87ec27e6e11d7f5c8cda300ab
Author: Stefan Hornburg (Racke) <racke@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;
}

_______________________________________________
interchange-cvs mailing list
interchange-cvs@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-cvs