Merge pull request #1 from mahhawarn/issues/2

Issues/2
This commit is contained in:
mahhawarn
2025-05-19 21:08:24 +09:00
committed by GitHub
2 changed files with 13 additions and 1 deletions

View File

@ -1 +1,5 @@
# kinggnu # kinggnu
1. show_current_datetime()
機能: 現在の日時を YYYY-MM-DD HH:MM:SS 形式で表示します。
使用ライブラリ: datetime モジュール

View File

@ -1 +1,9 @@
from datetime import datetime
def show_current_datetime():
now = datetime.now()
print("現在の日時:", now.strftime("%Y-%m-%d %H:%M:%S"))
show_current_datetime()
print("はげ") print("はげ")