MCPcopy Index your code
hub / github.com/jackzhenguo/python-small-examples / getEverydaySince

Function getEverydaySince

md/batch.py:13–26  ·  view source on GitHub ↗
(year,month,day,n=10)

Source from the content-addressed store, hash-verified

11from datetime import date,datetime
12
13def getEverydaySince(year,month,day,n=10):
14 i = 0
15 _, days = calendar.monthrange(year, month)
16 while i < n:
17 d = date(year,month,day)
18 if day == days:
19 month,day = month+1,0
20 _, days = calendar.monthrange(year, month)
21 if month == 13:
22 year,month = year+1,1
23 _, days = calendar.monthrange(year, month)
24 yield d
25 day += 1
26 i += 1
27
28
29def batchCreate(ps='.md',start=100,n=100,path='.',year=2020,month=2,day=1):

Callers 1

batchCreateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected