Packagecom.threerings.util
Classpublic class DateUtil

Utility for dates.



Protected Properties
 PropertyDefined by
  _days : Array
[static]
DateUtil
  _months : Object
[static]
DateUtil
Public Methods
 MethodDefined by
  
getConversationalDateString(date:Date, now:Date = null):String
[static] Calculates a brief, conversational representation of the given date relative to 'now': Date occured in a past year: 10/10/1969 Date occured over 6 days ago: Oct 10 Date occured over 23 hours ago: Wed 15:10 Date occured in the past 23 hours: 15:10
DateUtil
  
getDayName(day:uint, full:Boolean = false):String
[static] Return the name of the given (integer) day; 0 is Sunday, and so on.
DateUtil
  
getMonthName(month:uint, full:Boolean = false):String
[static] Return the name of the given (integer) month; 0 is January, and so on.
DateUtil
Property detail
_daysproperty
protected static var _days:Array
_monthsproperty 
protected static var _months:Object
Method detail
getConversationalDateString()method
public static function getConversationalDateString(date:Date, now:Date = null):String

Calculates a brief, conversational representation of the given date relative to 'now': Date occured in a past year: 10/10/1969 Date occured over 6 days ago: Oct 10 Date occured over 23 hours ago: Wed 15:10 Date occured in the past 23 hours: 15:10

Parameters
date:Date
 
now:Date (default = null)

Returns
String
getDayName()method 
public static function getDayName(day:uint, full:Boolean = false):String

Return the name of the given (integer) day; 0 is Sunday, and so on.

Parameters
day:uint
 
full:Boolean (default = false)

Returns
String
getMonthName()method 
public static function getMonthName(month:uint, full:Boolean = false):String

Return the name of the given (integer) month; 0 is January, and so on.

Parameters
month:uint
 
full:Boolean (default = false)

Returns
String