Runtime Type : Types : TimeUtil

From $1

Contains various functions for dealing with times and dates.

Back to Runtime Types

Inherits From

root→Object→TimeUtil

Function Summary
addTo Adds the specified amount of time to the given time-date.
addToFreeBusyStr function description
computeDiffMinutes Calculates the difference between two date-times in minutes.
computeDiffSeconds Calculates the difference between two date-times in seconds.
computeOffset function description
convertToDate Converts a given data to a date.
convertToDateTime Converts a given data to a dateTime.
convertToTime Converts a given data to a time.
dayOfMonth Extracts the numeric day of the month from a given date.
dayOfWeek Extracts the numeric day of the week from a given date.
daylightBoundaries function description
daylightOffset function description
format Formats the given data as a date-time using the given format string in local time.
formatToZone Formats the given data as a date-time using the given format string in the specified time zone.
getFreeBusyString function description
getTZData Extracts time zone information from a given date. The data extracted includes the daylight time name, display name, time zone name, offset (in minutes) and standard time name.
getTZNames Creates a list of the names of the Time Zones.
hour Extracts the numeric hour from a given date and time.
maxDays Computes the maximum number of days in the specified month and year.
maxDaysInMonth Returns the maximum number of days in the month in the supplied date.
minute Extracts the number of minutes from a given date and time.
month Extracts the numeric month from a given date.
normalize Converts the date and time into a normal date format (mm/dd/yyyy hh:mm AM|PM).
recurrenceAdjust function description
recurrenceComputePattern function description
recurrenceComputeRange function description
recurrenceComputeStartEnd function description
recurrencePredictNextDate function description
recurrencePredictStartEnd function description
second Extracts the number of seconds from a given date and time.
setFreeBusyRange function description
setTime function description
simple_formatGet Converts a date and time to a string in the standard mm/dd/yyyy hh:mm 24 hour format.
simple_formatGetDate Converts a date to a string in the standard mm/dd/yyyy hh:mm format where the time is 00:00:00. This format is used regardless how the DateTime Format property is set.
simple_formatParse Converts a string in the standard mm/dd/yyyy hh:mm format to a dateTime.
timeOfDayType function description
translate function description
weekOfMonth Extracts the numeric week of the month from a given date.
year Extracts the numeric year from a given date.
Function Detail

<h7 name="addTo">addTo</h7>

Adds the specified amount of time to the given time-date.

Syntax

addTo( [in] Data arg, [in] int32 years, [in] int32 months, [in] int32 days, [in] int32 hours, [in] int32 minutes, [in] int32 seconds, [out] dateTime result )

Parameters

arg
time-date to add to
years
number of years to add
months
number of months to add
days
number of days to add
hours
number of hours to add
minutes
number of minutes to add
seconds
number of seconds to add
result
resulting date-time

<h7 name="addToFreeBusyStr">addToFreeBusyStr</h7>

function description

Syntax

addToFreeBusyStr( [in] Data start, [in] Data end, [in] int32 type )

Parameters

start
argument description
end
argument description
type
argument description

<h7 name="computeDiffMinutes">computeDiffMinutes</h7>

Calculates the difference between two date-times in minutes.

Syntax

computeDiffMinutes( [in] Data start, [in] Data end, [out] int32 result )

Parameters

start
starting date
end
ending date
result
resulting difference between start and end in minutes

<h7 name="computeDiffSeconds">computeDiffSeconds</h7>

Calculates the difference between two date-times in seconds.

Syntax

computeDiffSeconds( [in] Data start, [in] Data end, [out] int32 result )

Parameters

start
starting date
end
ending date
result
resulting difference between start and end in seconds

<h7 name="computeOffset">computeOffset</h7>

function description

Syntax

computeOffset( [in] dateTime dtd, [in] TimeZone tzdata, [out] dateTime result )

Parameters

dtd
argument description
tzdata
argument description
result
argument description

<h7 name="convertToDate">convertToDate</h7>

Converts a given data to a date.

Syntax

convertToDate( [in] Data arg, [out] date result )

Parameters

arg
the data to be converted to a date
result
the resulting converted date

<h7 name="convertToDateTime">convertToDateTime</h7>

Converts a given data to a dateTime.

Syntax

convertToDateTime( [in] Data arg, [out] dateTime result )

Parameters

arg
the data to be converted to a dateTime
result
the resulting converted dateTime

<h7 name="convertToTime">convertToTime</h7>

Converts a given data to a time.

Syntax

convertToTime( [in] Data arg, [out] time result )

Parameters

arg
the data to be converted to a time
result
the resulting converted time

<h7 name="dayOfMonth">dayOfMonth</h7>

Extracts the numeric day of the month from a given date.

Syntax

dayOfMonth( [in] Data arg, [out] int32 result )

Parameters

arg
date from which to extract the day of the month
result
extracted day of the month

<h7 name="dayOfWeek">dayOfWeek</h7>

Extracts the numeric day of the week from a given date.

Syntax

dayOfWeek( [in] Data arg, [out] int32 result )

Parameters

arg
date from which to extract the day of the week
result
extracted day of the week

<h7 name="daylightBoundaries">daylightBoundaries</h7>

function description

Syntax

daylightBoundaries( [in] int32 year, [in] TZData tz, [out] dateTime daylightBoundry, [out] dateTime standardBoundry )

Parameters

year
argument description
tz
argument description
daylightBoundry
argument description
standardBoundry
argument description

<h7 name="daylightOffset">daylightOffset</h7>

function description

Syntax

daylightOffset( [in] dateTime arg, [in] TimeZone tz, [out] int32 result )

Parameters

arg
argument description
tz
argument description
result
argument description

<h7 name="format">format</h7>

Formats the given data as a date-time using the given format string.

Legend:


<y> -output the year excluding the century information i.e. 3 for 2003
<yy> -output the year excluding the century information (enforcing a two digit output) i.e. 03 for 2003
<Y> -output the full year including the century information i.e. 2003
<M> -output the month i.e. 3 for march
<MM> -output the month (enforcing a two digit output) i.e. 03 for march
<D> -output the day of the month i.e. 3 for third day of month
<DD> -output the day of the month (enforcing a two digit output) i.e. 03 for third day of month
<I> -output hour of the day military time i.e. 3
<II> -output hour of the day military time (enforcing a two digit output) i.e. 03
<H> -output hour of the day time i.e. 3
<HH> -output hour of the day time (enforcing a two digit output) i.e. 03
<m> -output minute of the hour i.e. 3
<mm> -output minute of the hour (enforcing a two digit output) i.e. 03
<s> -output minute of the hour i.e. 3
<ss> -output minute of the hour (enforcing a two digit output) i.e. 03
<t> -output abbreviated time zone information i.e. (GMT -07)
<T> -output full time zone information i.e. (GMT -07) Mountain Daylight Time
<P> -output AM or PM
<p> -output am or pm
<w> -output abbreviated day of the week ('Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat')
<W> -output full day of the week ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")
<N> -output full name of the month ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
<n> -output abbreviated name of the month ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")

<h7 name="formatToZone">formatToZone</h7>

Syntax

format( [in] Data arg, [in] string formatStr, [out] string result )

Parameters

arg
the date to format
formatStr
the string to use in formatting
result
the resulting formatted date

<h7 name="getFreeBusyString">getFreeBusyString</h7>

function description

Syntax

getFreeBusyString( [out] string result )

Parameters

result
argument description

<h7 name="getTZData">getTZData</h7>

Extracts time zone information from a given date. The data extracted includes the daylight time name, display name, time zone name, offset (in minutes) and standard time name.

Syntax

getTZData( [in] string name, [out] TimeZone tz )

Parameters

name
time zone name
tz
extracted time zone informatio

<h7 name="getTZNames">getTZNames</h7>

Creates a list of the names of the Time Zones.

Syntax

getTZNames( [out] Collection(string) list )

Parameters

list
list of time zones

<h7 name="hour">hour</h7>

Extracts the numeric hour from a given date and time.

Syntax

hour( [in] Data arg, [out] int32 result )

Parameters

arg
date and time from which to extract the hour
result
extracted hour

<h7 name="maxDays">maxDays</h7>

Computes the maximum number of days in the specified month and year.

Syntax

maxDays( [in] int32 month, [in] int32 year, [out] int32 result )

Parameters

month
month whose max days to compute
year
year in which to compute (account for leap-years)
result
max number of days in the month and year given

<h7 name="maxDaysInMonth">maxDaysInMonth</h7>

Returns the maximum number of days in the month in the supplied date.

Syntax

maxDaysInMonth( [in] Data arg, [out] int32 result )

Parameters

arg
date containing the month to be checked
result
maximum number of days in the month

<h7 name="minute">minute</h7>

Extracts the number of minutes from a given date and time.

Syntax

minute( [in] Data arg, [out] int32 result )

Parameters

arg
date and time from which to extract the minutes
result
extracted number of minutes

<h7 name="month">month</h7>

Extracts the numeric month from a given date.

Syntax

month( [in] Data arg, [out] int32 result )

Parameters

arg
date from which to extract the month
result
extgracted month

<h7 name="normalize">normalize</h7>

Converts the date and time into a normal date format (mm/dd/yyyy hh:mm AM|PM).

Syntax

normalize( [in] dateTime arg, [out] dateTime result )

Parameters

arg
dateTime to normalize
result
normalized dateTime

<h7 name="recurrenceAdjust">recurrenceAdjust</h7>

function description

Syntax

recurrenceAdjust( [in] Object recurrence, [in] string timeZone, [in] dateTime origStart, [in] dateTime start, [in] dateTime end, [out] time recurrenceStart, [out] time recurrenceEnd )

Parameters

recurrence
argument description
timeZone
argument description
origStart
argument description
start
argument description
end
argument description
recurrenceStart
argument description
recurrenceEnd
argument description

<h7 name="recurrenceComputePattern">recurrenceComputePattern</h7>

function description

Syntax

recurrenceComputePattern( [in] Object recurrenceObject, [in] time startTime, [in] time endTime )

Parameters

recurrenceObject
argument description
startTime
argument description
endTime
argument description

<h7 name="recurrenceComputeRange">recurrenceComputeRange</h7>

function description

Syntax

recurrenceComputeRange( [in] Object recurrenceObject, [in] date rangeStart, [in] date rangeEnd, [in] string timeZone, [in] time startTime, [out] Collection(string) result )

Parameters

recurrenceObject
argument description
rangeStart
argument description
rangeEnd
argument description
timeZone
argument description
startTime
argument description
result
argument description

<h7 name="recurrenceComputeStartEnd">recurrenceComputeStartEnd</h7>

function description

Syntax

recurrenceComputeStartEnd( [in] Object recurrenceObj )

Parameters

recurrenceObj
argument description

<h7 name="recurrencePredictNextDate">recurrencePredictNextDate</h7>

function description

Syntax

recurrencePredictNextDate( [in] Object rec, [in] date dtd, [out] date result )

Parameters

rec
argument description
dtd
argument description
result
argument description

<h7 name="recurrencePredictStartEnd">recurrencePredictStartEnd</h7>

function description

Syntax

recurrencePredictStartEnd( [in] Object recurrenceObj, [out] date newStart, [out] date newEnd )

Parameters

recurrenceObj
argument description
newStart
argument description
newEnd
argument description

<h7 name="second">second</h7>

Extracts the number of seconds from a given date and time.

Syntax

second( [in] Data arg, [out] int32 result )

Parameters

arg
date and time from which to extract the number of minutes
result
extracted number of minutes

<h7 name="setFreeBusyRange">setFreeBusyRange</h7>

function description

Syntax

setFreeBusyRange( [in] date start, [in] date end, [in] boolean reset )

Parameters

start
argument description
end
argument description
reset
argument description

<h7 name="setTime">setTime</h7>

function description

Syntax

setTime( [in] dateTime dtd, [in] Data time, [out] dateTime result )

Parameters

dtd
argument description
time
argument description
result
argument description

<h7 name="simple_formatGet">simple_formatGet</h7>

Converts a date and time to a string in the standard mm/dd/yyyy hh:mm 24 hour format.

Syntax

simple_formatGet( [in] dateTime dtd, [out] string result )

Parameters

dtd
date and time to be converted
result
converted date and time

<h7 name="simple_formatGetDate">simple_formatGetDate</h7>

Converts a date to a string in the standard mm/dd/yyyy hh:mm format where the time is 00:00:00. This format is used regardless how the DateTime Format property is set.

Syntax

simple_formatGetDate( [in] date dtd, [out] string result )

Parameters

dtd
date to be converted
result
converted date

<h7 name="simple_formatParse">simple_formatParse</h7>

Converts a string in the standard mm/dd/yyyy hh:mm format to a dateTime.

Syntax

simple_formatParse( [in] string str, [out] dateTime result )

Parameters

str
string to be converted
result
converted string

<h7 name="timeOfDayType">timeOfDayType</h7>

function description

Syntax

timeOfDayType( [in] Data arg, [out] int32 result )

Parameters

arg
argument description
result
argument description

<h7 name="translate">translate</h7>

function description

Syntax

translate( [in] dateTime arg, [in] TZData tz, [out] dateTime result )

Parameters

arg
argument description
tz
argument description
result
argument description

<h7 name="weekOfMonth">weekOfMonth</h7>

Extracts the numeric week of the month from a given date.

Syntax

weekOfMonth( [in] Data arg, [out] int32 result )

Parameters

arg
date from which to extract the week of the month
result
extracted week of the month

<h7 name="year">year</h7>

Extracts the numeric year from a given date.

Syntax

year( [in] Data arg, [out] int32 result )

Parameters

arg
date from which to extract the year
result
extracted year

Tags:
 
Images (0)
 
Comments (0)
You must login to post a comment.