Packagesystem.evaluators
Classpublic class DateEvaluator
InheritanceDateEvaluator Inheritance Object
Implements Evaluable

Evaluates Date object and transform it in string expressions.

All characters from 'A' to 'Z' and from 'a' to 'z' are reserved, although not all of these characters are interpreted right now.

If you want to include plain text in the pattern put it into quotes (') to avoid interpretation.

If you want a quote in the formatted date-time, put two quotes directly after one another.

For example: "hh 'o''clock'"

     import system.evaluators.DateEvaluator ;
     
     var evaluator:DateEvaluator = new DateEvaluator() ;
     
     evaluator.pattern = "DDDD d MMMM yyyy" ;
     trace( evaluator.eval( new Date(2008,1,21,10,15,0,0) ) ) ;
     
     evaluator.pattern = "hh 'h' nn 'mn' ss 's' tt" ;
     trace( evaluator.eval( new Date(2008,1,21,10,15,0,0) ) ) ; // 02 h 15 mn 00 s am
     
     evaluator.pattern = "hh 'h' nn 'mn' ss 's' t" ;
     trace( evaluator.eval( new Date(2008,1,21,10,15,0,0) ) ) ; // 02 h 15 mn 00 s a
     
     evaluator.pattern = "hh 'h' nn 'mn' ss 's' TT" ; // capitalize the pm expression.
     trace( evaluator.eval( new Date(2008,1,21,14,15,0,0) ) ) ; // 02 h 15 mn 00 s PM
     



Public Properties
 PropertyDefined By
  pattern : String
Indicates the internal pattern of this formatter.
DateEvaluator
Public Methods
 MethodDefined By
  
DateEvaluator(pattern:String = dd.mm.yyyy HH:nn:ss)
Creates a new DateEvaluator instance.
DateEvaluator
  
eval(o:*):*
Evaluates the specified object.
DateEvaluator
Property Detail
patternproperty
pattern:String

Indicates the internal pattern of this formatter.


Implementation
    public function get pattern():String
    public function set pattern(value:String):void
Constructor Detail
DateEvaluator()Constructor
public function DateEvaluator(pattern:String = dd.mm.yyyy HH:nn:ss)

Creates a new DateEvaluator instance.

Parameters
pattern:String (default = dd.mm.yyyy HH:nn:ss) — (optional) the pattern describing the date and time format.
Method Detail
eval()method
public function eval(o:*):*

Evaluates the specified object.

Parameters

o:*

Returns
*