Saturday, 31 August 2013

Simply transform my date format

Simply transform my date format

I have:
(new Date()).toISOString().slice(0, 10)
I want it returns without UTC:
2013-08-31
I try:
new Date().getYear() + "-" + new Date().getMonth() + "-" + new
Date().getDay()
But it does not work. It returns: 113-7-6.
Thanks a lot.

No comments:

Post a Comment