javascript - What is this JSON date in this JSON object? -
i have json analyze
this snippet of necessary question.
"updateddate":"\/date(1311377875937)\/" i don't know number is, updated date date item last updated
also, whatever is, how able find out if updated 20 seconds ago or less?
the number datetime, in milliseconds, since 1970. if divide 2 datetimes have 1000 , subtract them should difference in seconds.
var secondsdifference = (new date() - updatedate)/1000;
Comments
Post a Comment