2022.2

Table Of Contents
l
dateTimeformatsadateandtimeobjectusingacustompattern.Putthepatternafterthename
ofthedatafield,andencloseitindoublequotes.
Thecustompatternmayconsistofpatternletters,separatingsymbolsandquotedtext,for
example:"yyyy.MM.ddG'at'HH:mm:ssz";see"Dateandtimepatterns"onpage725.
l
dateTimeLongformatsadateandtimeaslongstringrepresentation,forexampleApril 1, 2022
12:00:00 EDT AM.
l
dateTimeMediumformatsadateandtimeasmediumstringrepresentation,forexampleApr 1,
2022 12:00:00 AM.
l
dateTimeShortformatsadateandtimeasshortstringrepresentation,forexample4/1/22 12:00
AM.
l
timeformatsatimeusingacustompattern.Putthepatternafterthenameofthedatafield,and
encloseitindoublequotes.
Thecustompatternmayconsistofpatternletters,separatingsymbolsandquotedtext,for
example:"'at'HH:mm:ssz";see"Dateandtimepatterns"onpage725.
l
timeLongformatsatimeaslongstringrepresentation,forexample12:00:00 EDT AM.
l
timeMediumformatsatimeasmediumstringrepresentation,forexample12:00:00 AM.
l
timeShortformatsatimeasshortstringrepresentation,forexample12:00 AM.
Creating custom Helpers
AHelperisafunctionthatcanbeusedinanexpression.
InbothHandlebarsandOLConnect,anumberofHelpersarepredefined(see"Usingfunctionsin
expressions:Helpers"onpage330),butyoucanalsocreateyourownHelpers.(SeetheHandlebars
guide:https://handlebarsjs.com/guide/#custom-helpers.)
ThistopicexplainshowtocreateacustomHelperinOLConnect.
Let'ssayyouwanttocreateacustomHelperthatreturnsthecurrentdate.ThenameoftheHelper
shouldbetoday,sothatitcanbeusedinanexpressionasfollows:
Example: {{today}}
Here'showyoudothat.
1. OntheScriptspane,clicktheblacktrianglenexttotheNewbuttonandclickControl Script.
ControlScriptsareexecutedfirst.See"ControlScripts"onpage398and"Thescriptflow:when
scriptsrun"onpage384.
Page 336