From f7de24d247da8d36c28a8280b39788644b149b02 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 19 Dec 2025 11:17:48 +0100 Subject: [PATCH] RDV --- ReflexUtils.ftl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ReflexUtils.ftl b/ReflexUtils.ftl index afa299e..a22ce70 100644 --- a/ReflexUtils.ftl +++ b/ReflexUtils.ftl @@ -9,6 +9,23 @@ <#return dateutc?datetime.iso?iso_nz(locale)> +<#-- -------------------------------------------------------------------------------------------- --> +<#-- Add second to dateTime ex: AddSecondsToDatetime("2025-11-17T09:15:00Z"?datetime.iso, 61) --> +<#-- -------------------------------------------------------------------------------------------- --> +<#function AddSecondsToDatetime date seconds> + <#assign timeInMilliseconds = (1000 * seconds) > + <#assign aDate = date?long + timeInMilliseconds> + <#return aDate?number_to_datetime> + + +<#-- -------------------------------------------------------------------------------------------- --> +<#-- Duration between two datetimes in second --> +<#-- -------------------------------------------------------------------------------------------- --> +<#function DurationBetweenTwoDatetimeInSeconds startDate endDate> + <#return (endDate?long - startDate?long) / 1000 > + + + <#-- --------------------------------------------------------------------------------------- --> <#-- Split email reflex into json array string --> <#-- Example : splitemail "john.doe@hardis-group.com,; name@hardis-group.com" -->