The parse function is established to parse String to Number or Date.
{any} = { Number | Date }
var nm = Number.parse("12,345.0", "#,000.0");
var dt = Date.parse("2016/09/08", "yyyy/MM/dd");
Calling | Returning |
{any} . parse ( value , formatter ) | String |
Parameters | Type | Description |
value | String | The string value of Number or Date. |
formatter | String | Number Formatter or Date Formatter |
Number Formatter |
0 |
# |
, |
. |
% |
Date Formatter |
GGGGy | Japan WAREKI, 2016 -- 平成28 |
Gy | Japan WAREKI, 2016 -- H28 |
yyyy |
yy |
MM |
M |
dd |
d |
HH |
H |
mm |
m |
ss |
s |
SSS |
S |