29 lines
1.4 KiB
Java
29 lines
1.4 KiB
Java
<#-- --------------------------------------------------------------------------------------- -->
|
|
<#-- Concat reflex timestamp with reflex time zone and format this date in ISO UTC format -->
|
|
<#-- --------------------------------------------------------------------------------------- -->
|
|
<#function RfxDateTimetoUTC rfxdatetime offset >
|
|
<#assign datetimeUTC = JsonUtil.createUTCDateTime(rfxdatetime,time_zone_rfx , "yyyy-MM-dd'T'HH:mm:ss") />
|
|
<#return (datetimeUTC)>
|
|
</#function>
|
|
|
|
<#-- --------------------------------------------------------------------------------------- -->
|
|
<#-- Split email reflex into json array string -->
|
|
<#-- Example : splitemail "john.doe@hardis-group.com,; name@hardis-group.com" -->
|
|
<#-- return "["john.doe@hardis-group.com","name@hardis-group.com"]" -->
|
|
<#-- ${splitEmailsIntoArray(emailReflex)} -->
|
|
<#-- --------------------------------------------------------------------------------------- -->
|
|
<#function splitEmailsIntoArray emails >
|
|
<#local str = "[">
|
|
<#list emails?split(';|,| ',"r")?filter(l -> l != "") as email>
|
|
<#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")>
|
|
<#if str != "[">
|
|
<#local str += ",">
|
|
</#if>
|
|
<#local str += "\"">
|
|
<#local str += email>
|
|
<#local str += "\"">
|
|
</#if>
|
|
</#list>
|
|
<#local str += "]">
|
|
<#return (str)>
|
|
</#function> |