DateTimeUDF Library

Functions24 public, 2 private

Creates an iCal event object.
publicstringiCalendarCreateEvent
requireddatebegins
anyends
structoptional{}
Converts the provided date from the specified timezone [srcTimezone] to the desired timezone [dstTimezone].
publicdateconvertFromTimeZone
requireddatedatetime
java.util.TimeZone.getTimeZone()
requiredstringsrcTimezone
java.util.TimeZone.getTimeZone()
requiredstringdstTimezone
Formats the date difference between the provided dates using the specified mask.
publicanydateDiffFormat
requireddatedateStart
requireddatedateEnd
"DE", "EN"languageEN
Returns the age by comparing the provided date with the current date.
publicnumericgetAge
requiredanydate
datenownow()
publicdategetClosestWeekday
requireddatedate
required"SU", "MO", "TU", "WE", "TH", "FR", "SA"weekday
Returns the first day of the week (Monday) for the specified date.
publicanygetFirstDayOfWeek
anydatenow()
Returns the last day of the week (Sunday) for the specified date.
publicanygetLastDayOfWeek
anydatenow()
Returns the roughly time difference between the provided timestamps and returns a localized expression.
publicstringgetRelativeTimeDifference
requiredanyts1
requiredanyts2
stringlanguageEN
Returns the roughly time difference between the provided timestamps and returns a localized expression.
publicstringgetTimeAgo
requiredanyts1
anyts2now()
stringlanguageEN
Returns the roughly time difference between the provided timestamps and returns a localized expression.
publicstringgetTimeAhead
requiredanyts1
anyts2now()
stringlanguageEN
Returns the TimeZone information for the specified point in time.
publicstructgetTimeZoneInfo
requireddatedate
Returns the date for the provided UNIX timestamp. The timestamp is the number of seconds since 1st January 1970. Timezone is UTC.
publicanyfromUnixTimestamp
UNIX timestamp to convert.
requirednumerictimestamp
Convert from UTC to the current timezone.
booleanconverttrue
Returns if the provided date lies between the specified dates.
publicbooleanisBetweenDates
requiredanydate
requiredanybeginDate
requiredanyendDate
Merges two dates to combine its date and time parts. The merging DOES NOT add date or time.
publicanymergeDateAndTime
Date part.
requiredanydate
Time part.
requiredanytime
publicstringtoJavaScriptDate
The date to convert.
datedatenow()
Convert to UTC based on the current timezone before stringify.
booleanconverttrue
Returns the UNIX timestamp of the specified date. The timestamp equals the number of seconds since 1st January 1970.
publicnumerictoUnixTimestamp
The date to convert.
datedatenow()
Convert to UTC based on the current timezone before timestamp calculation.
booleanconverttrue
Converts the provided date to UTC based on the current timezone.
publicanytoUTC
datedatenow()
Attempts to parse the provided value as date.
publicanyparseDate
requiredanyvalue
stringcountry
structOPTIONS{}
option"date", "verbose"returnTypedate
Parses and merges two date literals to combine its date and time parts.
publicanyparseDateAndTime
Date part.
requiredanydate
Time part.
requiredanytime
publicanyparseDateTime
requiredstringvalue
Attempts to parse the provided value as time.
publicanyparseTime
requiredanyvalue
publicanyparseTimeSpan
requiredanyvalue
Returns the time difference between the provided times in milliseconds.
publicnumerictimeDiff
requireddatetime1
requireddatetime2
Translates the specified number of days to a more convenient expression using weeks, months and years. The translation takes only place if the specified number is dividable with a remainder of zero. 7 days = week 30 days = month 365 days = year
publicstringtranslateDays
requirednumericdays
stringlanguageEN