0

What I would like to do is to calculate the - let's call it - expected date from a given date and given a number.

I am looking for something like this

$(date '+%Y-%m-%d %H:%M:%S' --date="10 days")

but I want to add +10 days from a given date and NOT from the current date.

I am sure that the answer will be probably simple, but at the moment I'm not able to find a solution.

Thanks in advance for the answers.

M.Orlandi
  • 99
  • 1
  • 11

1 Answers1

0

Solution found!

I'll write it here hoping that will be useful for someone.

date '+%y-%m-%d %H:%M:%S' -d "$given_date+10days"
M.Orlandi
  • 99
  • 1
  • 11