Can somebody tell me how they made this date script

I would need to create a script that adds date + 11 days to a text on product page

I cant link to a page for some reason and it is hard to explain

I need to make a script that says…

we will ship a product on …(here script calculates a date by today plus 11 days)
It will take us 11 days to ship a product. How to do that?

I would then need to inject this script into shopify template page…
Somebody gave me this formula

It calculates shipping from the purchase date, we would need to have something similar to calculate shipping 11 days after purchase…

Here is the page where example can be found

It is shown under SHIPPING DETAILS

it says

Ships by: Wed, Mar 13 you see it calculates today’s date plus adds 11 days plus to get march 13…

JS Date object has some methods to parse, and convert Dates.

That said, working with time is always a pain in my professional opinion, there are always different factors to account in, for example the user’s local time may produce a different date.

There are libraries which aims to help reduce the workloads in this aspects,
I think the most popular / spread in JS is still

MomentJS.

Conveniently has an Add method :+1: