build: use date.py instead of date
MacOS (and others) "date" command don't support all the options that GNU date has. So don't depend on that, add a small python program for this.
This commit is contained in:
9
build-aux/date.py
Executable file
9
build-aux/date.py
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/env python
|
||||
#The MacOS 'date' is not quite up to GNU standards
|
||||
import sys
|
||||
from datetime import datetime
|
||||
date=datetime.strptime(sys.argv[1],'%Y-%m-%d')
|
||||
print(date.strftime(sys.argv[2]))
|
||||
#
|
||||
# ./date.py 2023-10-14 "The year-month is %y %m"
|
||||
#
|
||||
Reference in New Issue
Block a user