Skip to content
Advertisement

How to add days to today? javascript

How to add days to today in day-month-year format? I tried this code but additionally get the time zone and month in the short word name. I want to receive, for example, August 12, 2023 here is the code:

JavaScript

Advertisement

Answer

To get the format: Month Day, Year, Simply use ECMAScript Internationalization API:

JavaScript
JavaScript

Note: ‘long’ uses the full name of the month, ‘short’ for the short name,

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement