最近2018中文字幕在日韩欧美国产成人片_国产日韩精品一区二区在线_在线观看成年美女黄网色视频_国产精品一区三区五区_国产精彩刺激乱对白_看黄色黄大色黄片免费_人人超碰自拍cao_国产高清av在线_亚洲精品电影av_日韩美女尤物视频网站

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
calendar在python3時(shí)間中常用函數(shù)有哪些以及使用示例

這篇文章主要介紹calendar在python3時(shí)間中常用函數(shù)有哪些以及使用示例,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!

成都創(chuàng)新互聯(lián)主營(yíng)長(zhǎng)清網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營(yíng)網(wǎng)站建設(shè)方案,重慶APP開發(fā)公司,長(zhǎng)清h5小程序開發(fā)搭建,長(zhǎng)清網(wǎng)站營(yíng)銷推廣歡迎長(zhǎng)清等地區(qū)企業(yè)咨詢

1.firstweekday()

firstweekday(): 返回當(dāng)前每周起始日期值。默認(rèn)情況下,首次載入calendar模塊時(shí)返回0,即星期一

import calendar
# 0
print(calendar.firstweekday())

2.setfirstweekday()

setfirstweekday(firstweekday) :通過(guò)常量 MONDAY、TUESDAY、WEDNESDAY、THURSDAY、FRIDAY、SATURDAY 和 SUNDAY 設(shè)置星期;其中 0 表示星期一,以此類推6表示星期日;

import calendar
calendar.setfirstweekday(calendar.SUNDAY)
# 6
print(calendar.firstweekday())

3. isleap()

isleap(year):判斷是否是閏年,閏年為True,平年為False

import calendar
# False
print(calendar.isleap(2018))
# True
print(calendar.isleap(2016))

4.leapdays()

leapdays(y1, y2): 返回[y1,y2)年份之間的閏年數(shù)量;

import calendar
# 2
print(calendar.leapdays(2012, 2020))

以上是calendar在python3時(shí)間中常用函數(shù)有哪些以及使用示例的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對(duì)大家有幫助,更多相關(guān)知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!


標(biāo)題名稱:calendar在python3時(shí)間中常用函數(shù)有哪些以及使用示例
標(biāo)題鏈接:http://fisionsoft.com.cn/article/gcceds.html