How to print the next week using the date command ?
date +"This is week: %U of %Y, Sprint: %y(W%U-%U)" The output should be
This is week: 04 of 2017, Sprint: 17(W04-05) Instead of
This is week: 04 of 2017, Sprint: 17(W04-04) How to print the next week using the date command ?
date +"This is week: %U of %Y, Sprint: %y(W%U-%U)" The output should be
This is week: 04 of 2017, Sprint: 17(W04-05) Instead of
This is week: 04 of 2017, Sprint: 17(W04-04) With GNU date:
date +"This is week: %U of %Y, Sprint: %y(W%U-$(date -d 'now + 7 days' +%U))" alternatively:
date +"This is week: %U of %Y, Sprint: %y(W%U-$(date -d 'next week 12:00' +%U))" date -d 'next week 12:00' in timezones that have DST. For instance, in mainland UK, faketime '2017-03-19 23:30' date +%W-%F-%R outputs 11-2017-03-19-23:30 and faketime '2017-03-19 23:30' date -d 'next week' +%W-%F-%R outputs 13-2017-03-27-00:30