javascript - Store `new Date ()` in JSON object -
i have following field validator object:
{ type:'date', 'min':new date() }
i hoping store new date()
expression in json , executed when it's parsed
save timestamp:
{ type:'date', 'min':(new date()).gettime() }
after read back:
var result = json.parse('{ "type":"date", "min":1234567 }'); result.date = new date(result.min);
Comments
Post a Comment