Hei folks,
I've been trying to use
(for everybody's convenience here in US and european output format)
So what I do for now, is adding +1 month and subtracting -8 days.
That gives me approximately the result I'm looking for, but it's not exact as you can imagine.
(Just adding +21 days does not work, because days are just counted like 29, 30, 31, 1, 2, 3...)
Any ideas on what arguments I could use with
This is going to be part of an sh script, so calculations/variables using sh are wellcome
Thanks!
I've been trying to use
date
to add 21 days (or 3 weeks) to a given date, e.g.:(for everybody's convenience here in US and european output format)
Code:
% date -v15d -v1m "+Europe %d.%m.%Y%nUS %D"
Europe 15.01.2017
US 01/15/17
That gives me approximately the result I'm looking for, but it's not exact as you can imagine.
(Just adding +21 days does not work, because days are just counted like 29, 30, 31, 1, 2, 3...)
Code:
% date -v15d -v1m -v+1m -v-8d "+Europe %d.%m.%Y%nUS %D"
Europe 07.02.2017
US 02/07/17
date
for en exact result?This is going to be part of an sh script, so calculations/variables using sh are wellcome

Thanks!