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

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -