2022-09-17 02:09:55 +09:00

30 lines
400 B
Bash

#!/usr/bin/env bash
case $1 in
"--hour")
date "+%I"
;;
"--minutes")
date "+%M"
;;
"--type")
date "+%p"
;;
"--date")
date "+ %a, %b %d"
;;
"--day")
date "+%d"
;;
"--month")
$(( `date "+%m"` -1 ))
;;
"--year")
date "+%y"
;;
*)
true
;;
esac