DEV Community

Discussion on: Format Date and Time with Vanilla JavaScript

Collapse
rfornal profile image
bob.ts Author

In my research to answer this question, I did note that the .toISOString method (MDN HERE) has most of what you are looking for without the odd complexity of my first answer. Since the output pattern is fixed, you might be able to slice out the parts you want, get the Day of Week and reassemble it all quickly.