How would I go about converting following date:
Thu Feb 18 12:25:00 SGT 2016
into a format like '2016-02-18'?
I know,
- That, using a new Date(Date.parse('...')), with calls, will help me get it. But the problem being timezone part (SGT).
- I dont want to use any libraries out there.
What would be the effective way to go about this?
Any help is appreciated!
PS:
Ok, I have tried
new Date(Date.parse('Thu Feb 18 12:25:00 SGT 2016'))
but of-course, it is going to me 'invalid date' error.