Update 2024-02-14 07:51 OpenBSD/amd64-x13
This commit is contained in:
25
.bin/OLD/next.sh
Executable file
25
.bin/OLD/next.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
# $1 = 2013-11-08
|
||||
|
||||
date_in=2013-11-08
|
||||
len=28
|
||||
|
||||
len_s=$(( 28 * 24 * 60 * 60 ))
|
||||
|
||||
# convert to ts
|
||||
date_s_in=$(date -jf %Y-%m-%d +%s $date_in)
|
||||
|
||||
# add len
|
||||
date_s_out1=$(( date_s_in + len_s ))
|
||||
date_s_out2=$(( date_s_out1 + len_s ))
|
||||
date_s_out3=$(( date_s_out2 + len_s ))
|
||||
|
||||
date_out1=$(date -jf %s +%Y-%m-%d $date_s_out1)
|
||||
date_out2=$(date -jf %s +%Y-%m-%d $date_s_out2)
|
||||
date_out3=$(date -jf %s +%Y-%m-%d $date_s_out3)
|
||||
|
||||
echo "$date_in + $len days = $date_out1"
|
||||
echo "$date_out1 + $len days = $date_out2"
|
||||
echo "$date_out2 + $len days = $date_out3"
|
||||
|
||||
Reference in New Issue
Block a user