4

I'm making a small online (Squarespace) store for a farm.

I'd like to specify that items will be available for pickup two days after purchasing online (not immediately). Ideally, I could insert that date seamlessly into the text so that visitors don't have to do the math themselves. So it would say something like, "If you order by 9pm today, your order will be available for pickup after 9am on [TODAY'S DATE + 2 DAYS]."

How do I do this? Will it require Javascript?

I don't know much about coding at all, so I appreciate any guidance.

Tim

Tim Manley
  • 41
  • 1

1 Answers1

-1

try this and see

Date.prototype.addDays = function(days) {
    var date = new Date(this.valueOf());
    date.setDate(date.getDate() + days);
    return date;
}

var date = new Date();

alert(date.addDays(5));

from here