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 -

dataset - MPAndroidchart returning no chart Data available -

post - imageshack API cURL -