You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var x = "1497810600000" //string casted timestamp
then, new Date(X) --> Invalid date.
The constructor of Date Object allows string input for long form of date only and not timestamp.
Can we update the deserialize function in Polymer.Base (probably in _deserializeValue () method of property-accessors.html) with following:
case 'Date':
var serialized;
if(value instanceof Date) {
serialized = Polymer.Base.deserialize(value, 'Date').getTime();
} else {
value = isNaN(value) ? value : Number(value);
serialized = new Date(value).getTime();
}
break;
The text was updated successfully, but these errors were encountered:
var x = "1497810600000" //string casted timestamp
then, new Date(X) --> Invalid date.
The constructor of Date Object allows string input for long form of date only and not timestamp.
Can we update the deserialize function in Polymer.Base (probably in _deserializeValue () method of property-accessors.html) with following:
The text was updated successfully, but these errors were encountered: