Packageorg.openzet.utils
Classpublic class DateUtil

All static utility class that implements methods related with dates.



Public Methods
 MethodDefined by
  
Constructor
DateUtil
  
dateToString(date:Date, formatString:String):String
[static] Returns the string representation of a Date object using specific format.
DateUtil
  
getDate():Number
[static] Returns current date.
DateUtil
  
getFullYear():Number
[static] Returns current year.
DateUtil
  
getMonth():Number
[static] Returns current month.
DateUtil
  
stringToDate(date:String):Date
[static] Interprets 8 digit string and returns converted Date object.
DateUtil
  
stringToMonth(date:String):Date
[static] Interprets 6 digit string and returns converted Date object.
DateUtil
Constructor detail
DateUtil()constructor
public function DateUtil()

Constructor

Method detail
dateToString()method
public static function dateToString(date:Date, formatString:String):String

Returns the string representation of a Date object using specific format.

Parameters
date:Date — Date object
 
formatString:String — format string such as YYYYMMDD

Returns
String — Returns formatted string representation of date.
getDate()method 
public static function getDate():Number

Returns current date.

Returns
Number
getFullYear()method 
public static function getFullYear():Number

Returns current year.

Returns
Number
getMonth()method 
public static function getMonth():Number

Returns current month.

Returns
Number
stringToDate()method 
public static function stringToDate(date:String):Date

Interprets 8 digit string and returns converted Date object.

Parameters
date:String — String containing year, month and date.

Returns
Date
stringToMonth()method 
public static function stringToMonth(date:String):Date

Interprets 6 digit string and returns converted Date object.

Parameters
date:String — String containing year and month.

Returns
Date