Calendar Utility methods for scripted widgets
- AdjustForServerTime
- AdjustForUserTime
- ApplyDateFilter
- DaysInMonth
- GetStartDayOfWeek
- ParseDateTimeExact
- RoundUp
- ToCultureSafeString
- TranslateDayOfWeek
Methods
AdjustForServerTime
Velocity
#set($dateTimeResponse = $calendar_v1_UI.AdjustForServerTime($userTime))
JavaScript
var dateTimeResponse = calendar_v1_UI.AdjustForServerTime(userTime);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
userTime | DateTime | User Time | Required |
Returns
DateTime
AdjustForUserTime
Velocity
#set($dateTimeResponse = $calendar_v1_UI.AdjustForUserTime($serverTime))
JavaScript
var dateTimeResponse = calendar_v1_UI.AdjustForUserTime(serverTime);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
serverTime | DateTime | Server Time | Required |
Returns
DateTime
ApplyDateFilter
Velocity
#set($iEnumerableResponse = $calendar_v1_UI.ApplyDateFilter($filterDate, $eventsToFilter))
JavaScript
var iEnumerableResponse = calendar_v1_UI.ApplyDateFilter(filterDate, eventsToFilter);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
filterDate | DateTime | Filter Date | Required | ||
eventsToFilter | IEnumerable of Event | Events To Filter | Required |
Returns
IEnumerable of Event
DaysInMonth
Velocity
#set($int32Response = $calendar_v1_UI.DaysInMonth($year, $month))
JavaScript
var int32Response = calendar_v1_UI.DaysInMonth(year, month);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
year | String | Year | Required | ||
month | String | Month | Required |
Returns
Int32
GetStartDayOfWeek
Velocity
#set($int32Response = $calendar_v1_UI.GetStartDayOfWeek($date))
JavaScript
var int32Response = calendar_v1_UI.GetStartDayOfWeek(date);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
date | DateTime | Date | Required |
Returns
Int32
ParseDateTimeExact
Converts a string in 'mm/dd/yyyy HH:mm:ss' format to a DateTime. Minimum Date if unparseable.
Velocity
#set($dateTimeResponse = $calendar_v1_UI.ParseDateTimeExact($date))
JavaScript
var dateTimeResponse = calendar_v1_UI.ParseDateTimeExact(date);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
date | String | Date | Required |
Returns
DateTime
RoundUp
Velocity
#set($dateTimeResponse = $calendar_v1_UI.RoundUp($date, $interval))
JavaScript
var dateTimeResponse = calendar_v1_UI.RoundUp(date, interval);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
date | DateTime | Date | Required | ||
interval | Int32 | Interval | Required |
Returns
DateTime
ToCultureSafeString
Velocity
#set($stringResponse = $calendar_v1_UI.ToCultureSafeString($date))
JavaScript
var stringResponse = calendar_v1_UI.ToCultureSafeString(date);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
date | DateTime | Date | Required |
Returns
String
TranslateDayOfWeek
Velocity
#set($stringResponse = $calendar_v1_UI.TranslateDayOfWeek($weekDay, $forMini))
JavaScript
var stringResponse = calendar_v1_UI.TranslateDayOfWeek(weekDay, forMini);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
weekDay | Int32 | Week Day | Required | ||
forMini | Boolean | For Mini | Required |
Returns
String