Ardisia Component Library DocumentationAll Packages | All Classes | Index | Frames
SchedulingUtils
 
Packageardisia.utils
Classpublic class SchedulingUtils
InheritanceSchedulingUtils Inheritance Object

Miscellaneous useful functions for use with the Calendar class.

Completely static class, no need to create any instances.



Public Methods
 MethodDefined 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
Protected Methods
 MethodDefined 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
Method Detail
cloneSchedulingData()method
public static function cloneSchedulingData(item:SchedulingData):SchedulingData

Creates an exact copy of a SchedulingData object.

Uses flash reflection classes.

Parameters

item:SchedulingData — the SchedulingData object to clone

Returns
SchedulingData — a SchedulingData object
getDefaultTime()method 
public static function getDefaultTime(dt:Date = null):Array

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.

Parameters

dt:Date (default = null) — Date to use to add the default time

Returns
Array — [dtStart, dtEnd]
parseRecurrenceString()method 
public static function parseRecurrenceString(data:SchedulingData, prefix:String):String

Returns 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

Returns
String — a formatted string
parseTimeString()method 
public static function parseTimeString(dtStart:Date, dtEnd:Date = null, allDay:Boolean = false, longMode:Boolean = true):String

Parses 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)

Returns
String — a formatted string
resetRecurrenceData()method 
public static function resetRecurrenceData(data:SchedulingData):SchedulingData

Convenience method to reset all recurrence properties to defaults.

Parameters

data:SchedulingData — the SchedulingData object to scrub recurrence properties

Returns
SchedulingData — a SchedulingData object
returnDayName()method 
protected static function returnDayName(dayNum:Number):String

Returns a preferred string for the name of the week based on the Date day property.

Parameters

dayNum:Number

Returns
String — a formatted string
returnMonthName()method 
protected static function returnMonthName(monthNum:Number):String

Returns a preferred string for the name of the month based on the Date month property.

Parameters

monthNum:Number

Returns
String — a formatted string
returnOrder()method 
protected static function returnOrder(dayNum:Number):String

Returns a preferred string for the order of the day in the week based on the Date day property.

Parameters

dayNum:Number

Returns
String — a formatted string