mirror of
https://codeberg.org/hyperreal/bin
synced 2024-11-01 16:43:08 +01:00
20 lines
420 B
Python
Executable File
20 lines
420 B
Python
Executable File
#!/usr/bin/env python
|
|
#
|
|
# Usage: dayofweek <year> <month> <day>
|
|
#
|
|
# Example: dayofweek 2003 11 6
|
|
|
|
import sys
|
|
from datetime import datetime
|
|
|
|
if __name__ == "__main__":
|
|
if len(sys.argv) != 4:
|
|
print("Usage: dayofweek <year> <month> <day>")
|
|
exit(1)
|
|
else:
|
|
print(
|
|
datetime(int(sys.argv[1]), int(sys.argv[2]), int(sys.argv[3])).strftime(
|
|
"%A"
|
|
)
|
|
)
|