展开全部
我的QQ:8198541 如脚本名为date.py
执行date.py 输出当日日历32313133353236313431303231363533e4b893e5b19e31333264636230
执行date.py 2000 输出2000年1月日历
执行date.py 2000 5 输出2000年5月日历
#-*- coding: utf-8 -*-
"""
name: gcal.py
author: apache
function: print calendar for (year, month)
version: 1.0
uasge: python gcal.py [year] [month]
"""
import sys, time
MIN_YEAR = 0
MAX_YEAR = 100000
MIN_MONTH = 1
MAX_MONTH = 12
mdict = {"Jan" : 1, "Feb" : 2, "Mar" : 3, "Apr" : 4, "May" : 5, "Jun" : 6,"Jul" : 7, "Aug" : 8, "Sep" : 9, "Oct" : 10, "Nov" : 11, "Dec" : 12}
# get year and month
def getYearMonth():
"""
Get year and month from time moudle