summaryrefslogtreecommitdiff
path: root/build-aux/date.py
blob: d93b13d00eb7124188183839916ac94df7b87b7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env python3

"""
Script to get date strings, since the MacOS 'date' is not quite up to GNU
standards

E.g..
  date.py 2023-10-14 "The year-month is %y %m"
"""

import sys
from datetime import datetime

date=datetime.strptime(sys.argv[1],'%Y-%m-%d')
print(date.strftime(sys.argv[2]))