add feature: show time in japanese

main
千住柱間 2024-03-02 23:05:55 +00:00
parent a716545d1b
commit c479712678
1 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
# Get the current date in Japanese-style format without the day # Get the current date and time in Japanese-style format
japanese_date=$(date '+%Y年%m月%d日') japanese_datetime=$(date '+%Y年%m月%d日 %H時%M分%S秒')
# Get the current day of the week in English # Get the current day of the week in English
english_day=$(date '+%A') english_day=$(date '+%A')
@ -17,7 +17,7 @@ case $english_day in
esac esac
# Combine the Japanese-style date with the Japanese day name, adding spaces # Combine the Japanese-style date with the Japanese day name, adding spaces
japanese_date_with_day=" $japanese_date $japanese_day" japanese_date_with_day=" $japanese_datetime $japanese_day"
# Output the formatted date and day in Japanese # Output the formatted date, time, and day in Japanese
echo "📅 $japanese_date_with_day " echo "📅 $japanese_date_with_day "