𝗜𝗭 Markdownのカレンダーテーブルを出力する 修正した
MIT Python
2021年01月07日
Copy Clone
import datetime

# localeが動かなかったので削除

row_date = datetime.date.today()

print("|日付|予定|メモ|")
print("|:---:|:---|:---|")

for i in range(15):
  row = "| "
  row += str(row_date.strftime("%m/%d %a "))
  row += "| "
  if row_date.weekday() == 0: #月曜
    row += ""
  elif row_date.weekday() == 1: #火曜
    row += ""
  elif row_date.weekday() == 2: #水曜
    row += ""
  elif row_date.weekday() == 3: #木曜
    row += ""
  elif row_date.weekday() == 4: #金曜
    row += ""
  elif row_date.weekday() == 5: #土曜
    row += ""
  elif row_date.weekday() == 6: #日曜
    row += ""
  row += " |  |"
  print(row)
  row_date += datetime.timedelta(days=1)
import datetime

# localeが動かなかったので削除

row_date = datetime.date.today()

print("|日付|予定|メモ|")
print("|:---:|:---|:---|")

for i in range(15):
  row = "| "
  row += str(row_date.strftime("%m/%d %a "))
  row += "| "
  if row_date.weekday() == 0: #月曜
    row += ""
  elif row_date.weekday() == 1: #火曜
    row += ""
  elif row_date.weekday() == 2: #水曜
    row += ""
  elif row_date.weekday() == 3: #木曜
    row += ""
  elif row_date.weekday() == 4: #金曜
    row += ""
  elif row_date.weekday() == 5: #土曜
    row += ""
  elif row_date.weekday() == 6: #日曜
    row += ""
  row += " |  |"
  print(row)
  row_date += datetime.timedelta(days=1)
Pythonでmarkdownのカレンダーの表(2週間くらい)を出力して,コピペする用.
ブラウザで動かしたい.
No one still commented. Please first comment.
Output