| Package | system.evaluators |
| Class | public class DateEvaluator |
| Inheritance | DateEvaluator Object |
| Implements | Evaluable |
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
| Property | Defined By | ||
|---|---|---|---|
| pattern : String
Indicates the internal pattern of this formatter. | DateEvaluator | ||
| Method | Defined By | ||
|---|---|---|---|
DateEvaluator(pattern:String = dd.mm.yyyy HH:nn:ss)
Creates a new DateEvaluator instance. | DateEvaluator | ||
eval(o:*):*
Evaluates the specified object. | DateEvaluator | ||
| pattern | property |
pattern:StringIndicates the internal pattern of this formatter.
public function get pattern():String public function set pattern(value:String):void| DateEvaluator | () | Constructor |
public function DateEvaluator(pattern:String = dd.mm.yyyy HH:nn:ss)Creates a new DateEvaluator instance.
Parameterspattern:String (default = dd.mm.yyyy HH:nn:ss) — (optional) the pattern describing the date and time format.
|
| eval | () | method |
public function eval(o:*):*Evaluates the specified object.
Parameters
o:* |
* |