# Javascript Date.prototype.toJSON() or Date.prototype.toISOString()

**URL:** <https://discourse.mozilla.org/t/javascript-date-prototype-tojson-or-date-prototype-toisostring/47603>\
**Category:** Developer Community\
**Created:** [October 29, 2019, 4:37am UTC](https://discourse.mozilla.org/t/javascript-date-prototype-tojson-or-date-prototype-toisostring/47603 "2019-10-29T04:37:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ntadiko](https://avatars.discourse-cdn.com/v4/letter/n/13edae/32.png) [@ntadiko](https://discourse.mozilla.org/u/ntadiko)\
**Post date:** [October 29, 2019, 4:37am UTC](https://discourse.mozilla.org/t/javascript-date-prototype-tojson-or-date-prototype-toisostring/47603/1 "2019-10-29T04:37:50Z")

</div>

I just found out that Date.prototype.toJSON() returns string format same as Date.prototype.toISOString(), why do we have them both? I did not know which community to add this on, so please suggest if any community is targeted for it. Where do I questions like these? It was good that, I had Mozilla DN, otherwise, I don’t know where to post these.
