Packagecom.flexicious.utils
Classpublic class DateRange
InheritanceDateRange Inheritance Object
Implements flash.events.IEventDispatcher

Utility class to manage date ranges.



Public Properties
 PropertyDefined By
  DATE_RANGE_CUSTOM : String
[static]
DateRange
  DATE_RANGE_IN_THE_FUTURE : String
[static]
DateRange
  DATE_RANGE_IN_THE_PAST : String
[static]
DateRange
  DATE_RANGE_LAST_12_HOURS : String
[static]
DateRange
  DATE_RANGE_LAST_24_HOURS : String
[static]
DateRange
  DATE_RANGE_LAST_7_DAYS : String
[static]
DateRange
  DATE_RANGE_LASTHOUR : String
[static]
DateRange
  DATE_RANGE_LASTMONTH : String
[static]
DateRange
  DATE_RANGE_LASTQUARTER : String
[static]
DateRange
  DATE_RANGE_LAST_SIXTY_MINTUES : String
[static]
DateRange
  DATE_RANGE_LASTWEEK : String
[static]
DateRange
  DATE_RANGE_LASTYEAR : String
[static]
DateRange
  DATE_RANGE_NEXTHOUR : String
[static]
DateRange
  DATE_RANGE_NEXTMONTH : String
[static]
DateRange
  DATE_RANGE_NEXTQUARTER : String
[static]
DateRange
  DATE_RANGE_NEXTWEEK : String
[static]
DateRange
  DATE_RANGE_NEXTYEAR : String
[static]
DateRange
  DATE_RANGE_THISHOUR : String
[static]
DateRange
  DATE_RANGE_THISMONTH : String
[static]
DateRange
  DATE_RANGE_THISQUARTER : String
[static]
DateRange
  DATE_RANGE_THISWEEK : String
[static]
DateRange
  DATE_RANGE_THISYEAR : String
[static]
DateRange
  DATE_RANGE_TODAY : String
[static]
DateRange
  DATE_RANGE_TOMORROW : String
[static]
DateRange
  dateRangeType : String
DateRange
  DATE_RANGE_YESTERDAY : String
[static]
DateRange
  endDate : Date
DateRange
  showTimePicker : Boolean
DateRange
  startDate : Date
DateRange
  staticEventDispatcher : IEventDispatcher
[static] [read-only]
DateRange
Public Methods
 MethodDefined By
  
DateRange(dateRangeType:String, startDate:Date = null, endDate:Date = null)
Given a date range, sets the startDate and endDate values to the appropraite values.
DateRange
  
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, weakRef:Boolean = false):void
DateRange
  
dispatchEvent(event:Event):Boolean
DateRange
  
getEndOfQuarter(year:int, quarter:int):Date
[static] Given a quarter, returns the date at the end of the quarter
DateRange
  
getStartOfQuarter(year:int, quarter:int):Date
[static] Given a quarter, returns the date at the start of the quarter
DateRange
  
hasEventListener(type:String):Boolean
DateRange
  
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
DateRange
  
willTrigger(type:String):Boolean
DateRange
Property Detail
DATE_RANGE_CUSTOMproperty
DATE_RANGE_CUSTOM:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_CUSTOM():String
    public static function set DATE_RANGE_CUSTOM(value:String):void
DATE_RANGE_IN_THE_FUTUREproperty 
DATE_RANGE_IN_THE_FUTURE:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_IN_THE_FUTURE():String
    public static function set DATE_RANGE_IN_THE_FUTURE(value:String):void
DATE_RANGE_IN_THE_PASTproperty 
DATE_RANGE_IN_THE_PAST:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_IN_THE_PAST():String
    public static function set DATE_RANGE_IN_THE_PAST(value:String):void
DATE_RANGE_LAST_12_HOURSproperty 
DATE_RANGE_LAST_12_HOURS:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_LAST_12_HOURS():String
    public static function set DATE_RANGE_LAST_12_HOURS(value:String):void
DATE_RANGE_LAST_24_HOURSproperty 
DATE_RANGE_LAST_24_HOURS:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_LAST_24_HOURS():String
    public static function set DATE_RANGE_LAST_24_HOURS(value:String):void
DATE_RANGE_LAST_7_DAYSproperty 
DATE_RANGE_LAST_7_DAYS:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_LAST_7_DAYS():String
    public static function set DATE_RANGE_LAST_7_DAYS(value:String):void
DATE_RANGE_LAST_SIXTY_MINTUESproperty 
DATE_RANGE_LAST_SIXTY_MINTUES:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_LAST_SIXTY_MINTUES():String
    public static function set DATE_RANGE_LAST_SIXTY_MINTUES(value:String):void
DATE_RANGE_LASTHOURproperty 
DATE_RANGE_LASTHOUR:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_LASTHOUR():String
    public static function set DATE_RANGE_LASTHOUR(value:String):void
DATE_RANGE_LASTMONTHproperty 
DATE_RANGE_LASTMONTH:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_LASTMONTH():String
    public static function set DATE_RANGE_LASTMONTH(value:String):void
DATE_RANGE_LASTQUARTERproperty 
DATE_RANGE_LASTQUARTER:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_LASTQUARTER():String
    public static function set DATE_RANGE_LASTQUARTER(value:String):void
DATE_RANGE_LASTWEEKproperty 
DATE_RANGE_LASTWEEK:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_LASTWEEK():String
    public static function set DATE_RANGE_LASTWEEK(value:String):void
DATE_RANGE_LASTYEARproperty 
DATE_RANGE_LASTYEAR:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_LASTYEAR():String
    public static function set DATE_RANGE_LASTYEAR(value:String):void
DATE_RANGE_NEXTHOURproperty 
DATE_RANGE_NEXTHOUR:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_NEXTHOUR():String
    public static function set DATE_RANGE_NEXTHOUR(value:String):void
DATE_RANGE_NEXTMONTHproperty 
DATE_RANGE_NEXTMONTH:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_NEXTMONTH():String
    public static function set DATE_RANGE_NEXTMONTH(value:String):void
DATE_RANGE_NEXTQUARTERproperty 
DATE_RANGE_NEXTQUARTER:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_NEXTQUARTER():String
    public static function set DATE_RANGE_NEXTQUARTER(value:String):void
DATE_RANGE_NEXTWEEKproperty 
DATE_RANGE_NEXTWEEK:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_NEXTWEEK():String
    public static function set DATE_RANGE_NEXTWEEK(value:String):void
DATE_RANGE_NEXTYEARproperty 
DATE_RANGE_NEXTYEAR:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_NEXTYEAR():String
    public static function set DATE_RANGE_NEXTYEAR(value:String):void
DATE_RANGE_THISHOURproperty 
DATE_RANGE_THISHOUR:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_THISHOUR():String
    public static function set DATE_RANGE_THISHOUR(value:String):void
DATE_RANGE_THISMONTHproperty 
DATE_RANGE_THISMONTH:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_THISMONTH():String
    public static function set DATE_RANGE_THISMONTH(value:String):void
DATE_RANGE_THISQUARTERproperty 
DATE_RANGE_THISQUARTER:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_THISQUARTER():String
    public static function set DATE_RANGE_THISQUARTER(value:String):void
DATE_RANGE_THISWEEKproperty 
DATE_RANGE_THISWEEK:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_THISWEEK():String
    public static function set DATE_RANGE_THISWEEK(value:String):void
DATE_RANGE_THISYEARproperty 
DATE_RANGE_THISYEAR:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_THISYEAR():String
    public static function set DATE_RANGE_THISYEAR(value:String):void
DATE_RANGE_TODAYproperty 
DATE_RANGE_TODAY:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_TODAY():String
    public static function set DATE_RANGE_TODAY(value:String):void
DATE_RANGE_TOMORROWproperty 
DATE_RANGE_TOMORROW:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_TOMORROW():String
    public static function set DATE_RANGE_TOMORROW(value:String):void
DATE_RANGE_YESTERDAYproperty 
DATE_RANGE_YESTERDAY:String

This property can be used as the source for data binding.


Implementation
    public static function get DATE_RANGE_YESTERDAY():String
    public static function set DATE_RANGE_YESTERDAY(value:String):void
dateRangeTypeproperty 
dateRangeType:String

This property can be used as the source for data binding.


Implementation
    public function get dateRangeType():String
    public function set dateRangeType(value:String):void
endDateproperty 
endDate:Date

This property can be used as the source for data binding.


Implementation
    public function get endDate():Date
    public function set endDate(value:Date):void
showTimePickerproperty 
showTimePicker:Boolean

This property can be used as the source for data binding.


Implementation
    public function get showTimePicker():Boolean
    public function set showTimePicker(value:Boolean):void
startDateproperty 
startDate:Date

This property can be used as the source for data binding.


Implementation
    public function get startDate():Date
    public function set startDate(value:Date):void
staticEventDispatcherproperty 
staticEventDispatcher:IEventDispatcher  [read-only]


Implementation
    public static function get staticEventDispatcher():IEventDispatcher
Constructor Detail
DateRange()Constructor
public function DateRange(dateRangeType:String, startDate:Date = null, endDate:Date = null)

Given a date range, sets the startDate and endDate values to the appropraite values.

Parameters
dateRangeType:String — One of the DATE_RANGE constants
 
startDate:Date (default = null) — Start Date of the custom date range. Only required where dateRangeType=DATE_RANGE_CUSTOM
 
endDate:Date (default = null) — End Date of the custom date range. Only required where dateRangeType=DATE_RANGE_CUSTOM
Method Detail
addEventListener()method
public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, weakRef:Boolean = false):void

Parameters

type:String
 
listener:Function
 
useCapture:Boolean (default = false)
 
priority:int (default = 0)
 
weakRef:Boolean (default = false)

dispatchEvent()method 
public function dispatchEvent(event:Event):Boolean

Parameters

event:Event

Returns
Boolean
getEndOfQuarter()method 
public static function getEndOfQuarter(year:int, quarter:int):Date

Given a quarter, returns the date at the end of the quarter

Parameters

year:int
 
quarter:int

Returns
Date
getStartOfQuarter()method 
public static function getStartOfQuarter(year:int, quarter:int):Date

Given a quarter, returns the date at the start of the quarter

Parameters

year:int
 
quarter:int

Returns
Date
hasEventListener()method 
public function hasEventListener(type:String):Boolean

Parameters

type:String

Returns
Boolean
removeEventListener()method 
public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void

Parameters

type:String
 
listener:Function
 
useCapture:Boolean (default = false)

willTrigger()method 
public function willTrigger(type:String):Boolean

Parameters

type:String

Returns
Boolean