| Package | ardisia.utils |
| Class | public class SchedulingUtils |
| Inheritance | SchedulingUtils Object |
Completely static class, no need to create any instances.
| Method | Defined By | ||
|---|---|---|---|
[static]
Creates an exact copy of a SchedulingData object. | SchedulingUtils | ||
getDefaultTime(dt:Date = null):Array [static]
Returns the closest 30 minute interval with a 1 hour duration based on
the passed date or today's date if no dt is passed. | SchedulingUtils | ||
parseRecurrenceString(data:SchedulingData, prefix:String):String [static]
Returns a formatted string that describes the recurrence of a
SchedulingData object in plain English. | SchedulingUtils | ||
parseTimeString(dtStart:Date, dtEnd:Date = null, allDay:Boolean = false, longMode:Boolean = true):String [static]
Parses a time range string with American formatting. | SchedulingUtils | ||
[static]
Convenience method to reset all recurrence properties to defaults. | SchedulingUtils | ||
| Method | Defined By | ||
|---|---|---|---|
returnDayName(dayNum:Number):String [static]
Returns a preferred string for the name of the week based on the Date
day property. | SchedulingUtils | ||
returnMonthName(monthNum:Number):String [static]
Returns a preferred string for the name of the month based on the Date
month property. | SchedulingUtils | ||
returnOrder(dayNum:Number):String [static]
Returns a preferred string for the order of the day in the week based on
the Date day property. | SchedulingUtils | ||
| cloneSchedulingData | () | method |
public static function cloneSchedulingData(item:SchedulingData):SchedulingDataCreates an exact copy of a SchedulingData object.
Uses flash reflection classes.
Parameters
item:SchedulingData — the SchedulingData object to clone
|
SchedulingData — a SchedulingData object
|
| getDefaultTime | () | method |
public static function getDefaultTime(dt:Date = null):ArrayReturns the closest 30 minute interval with a 1 hour duration based on the passed date or today's date if no dt is passed.
Parameters
dt:Date (default = null) — Date to use to add the default time
|
Array — [dtStart, dtEnd]
|
| parseRecurrenceString | () | method |
public static function parseRecurrenceString(data:SchedulingData, prefix:String):StringReturns a formatted string that describes the recurrence of a SchedulingData object in plain English.
Parameters
data:SchedulingData — a SchedulingData object
| |
prefix:String — a string to append to the return string
|
String — a formatted string
|
| parseTimeString | () | method |
public static function parseTimeString(dtStart:Date, dtEnd:Date = null, allDay:Boolean = false, longMode:Boolean = true):StringParses a time range string with American formatting. Override to parse for other formats.
Parameters
dtStart:Date — the RendererData object to parse
| |
dtEnd:Date (default = null) — TRUE to return a long string, FALSE to return a short
string
| |
allDay:Boolean (default = false) | |
longMode:Boolean (default = true) |
String — a formatted string
|
| resetRecurrenceData | () | method |
public static function resetRecurrenceData(data:SchedulingData):SchedulingDataConvenience method to reset all recurrence properties to defaults.
Parameters
data:SchedulingData — the SchedulingData object to scrub recurrence properties
|
SchedulingData — a SchedulingData object
|
| returnDayName | () | method |
protected static function returnDayName(dayNum:Number):StringReturns a preferred string for the name of the week based on the Date day property.
Parameters
dayNum:Number |
String — a formatted string
|
| returnMonthName | () | method |
protected static function returnMonthName(monthNum:Number):StringReturns a preferred string for the name of the month based on the Date month property.
Parameters
monthNum:Number |
String — a formatted string
|
| returnOrder | () | method |
protected static function returnOrder(dayNum:Number):StringReturns a preferred string for the order of the day in the week based on the Date day property.
Parameters
dayNum:Number |
String — a formatted string
|