1
0
mirror of https://github.com/djcb/mu.git synced 2024-06-22 07:06:48 +02:00
mu/build-aux/date.py
Dirk-Jan C. Binnema 48cb83b427 build: path improvements
Use correct paths in date.py

Fix some build warnings
2023-10-14 16:46:05 +03:00

16 lines
294 B
Python
Executable File

#!/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]))