Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
Adobe Flex SDK Previous
-
None
-
None
-
Affected OS(s): All OS Platforms
Affected OS(s): All OS Platforms
Language Found: English
Description
Steps to reproduce:
DateTimeFormatter :
Formate( null ) ---> return null , and lastOperationStatus is noError
Format ( new Object() ) --> return empty string , and lastOperationStatus is illegalArgumentError
Format ( object = Date ) ---> Okay
NumberFormatter :
Format ( null ) ---> return null , and lastOperationStatus is noError
Format ( new Object() ) ---> return NaN , and lastOperationStatus is noError
Format ( object = Number ) --> Okay
CurrencyFormatter : ( the same as NumberFormatter )
Format ( null ) --> return null , and lastOperationStatus is noError
Format ( new Object() ) --> return NaN , and lastOperationStatus is noError
Format ( object = Number ) ---> Okay
Here are feedback from developer :
========================
(1) If the given argument is null, we just return null.
(2) DateFormatter case:
a. If the given argument is Date or Date-derived object, we pass the as-is argument to the flash.globalization.
b. If the given argument is not Date nor Date-derived object, we create a new Date object by calling the Date class constructor and give it to the flash.globalization.
(3) NumberFormatter/CurrencyFormatter case:
a. No matter what the given argument is, we just convert it to Number object by casting with the Number() function.
(4) Let the underlying flash.globalization to do whatever it does. It can throw an exception or return some status code.
======================
For DateTimeFormatter , it's said :
b. If the given argument is not Date nor Date-derived object, we create a new Date object by calling the Date class constructor and give it to the flash.globalization.
However , currently we get empty string for format results , and illegalArgumentError for lastOperationStatus.