calendar模块的作用

    calendar模块定义了Calendar类,其中封装了一些值的计算,如给定的一个月或一年中的周日期。另外,TextCalendar和HTMLCalendar类可以生成经过预格式化的输出。

1、指定年月,显示出日期

import calendar

c = calendar.TextCalendar(calendar.SUNDAY)
c.prmonth(2020,5)
calendar_textcalendar.py

相关文章:

  • 2021-08-30
  • 2022-12-23
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
猜你喜欢
  • 2021-12-16
  • 2022-12-23
  • 2021-09-27
  • 2021-06-04
  • 2021-08-01
  • 2021-10-22
  • 2021-07-02
相关资源
相似解决方案