Use built-in Date#tojson.