[wellwell] Apply format if provided in [datetime] tag.
Stefan Hornburg <[email protected]> Fri, 31 Aug 2018 06:02:09 +0000
| Newsgroups | gmane.comp.web.interchange.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit e496efbfb5f612d87ec27e6e11d7f5c8cda300ab Author: Stefan Hornburg (Racke) <[email protected]> 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; }