diff --git a/README.md b/README.md index dbd5942b..03830a28 100644 --- a/README.md +++ b/README.md @@ -167,5 +167,6 @@ | 130 | [groupby多字段分组](md/130.md) | itemgetter,itertools,groupby | V1.0 | ⭐️⭐️⭐️⭐️ | | 131 | [itemgetter和key函数](md/131.md) | operator,itemgetter,itertools | V1.0 | ⭐️⭐️⭐️⭐️⭐️ | | 132 | [sum函数计算和聚合同时做](md/132.md) | sum,generator | V1.0 | ⭐️⭐️⭐️⭐️⭐️ | +| | [获得某天后的1~n天](md/133.md) | Calendar,itermonthdates | V4.0 | ⭐️⭐️⭐️ | 更多例子正在整理发布中...... \ No newline at end of file diff --git a/md/133.md b/md/133.md index 342ec50e..0fb6addd 100644 --- a/md/133.md +++ b/md/133.md @@ -3,3 +3,39 @@ @desc @date 2020/1/1 ``` + +#### 133 获得某天后的1~n天 + +```python +import calendar +from datetime import date,datetime + +def getEverydaySince(year,month,day,n=10): + i = 0 + while i < n: + for d in calendar.Calendar().itermonthdates(year,month): + if i >= n: + break + if d < date(year,month,day): + continue + yield d + i += 1 +``` + +测试结果: + +```markdown +In [3]: for day in getEverydaySince(2020,2,1): + ...: print(day) +2020-02-01 +2020-02-02 +2020-02-03 +2020-02-04 +2020-02-05 +2020-02-06 +2020-02-07 +2020-02-08 +2020-02-09 +2020-02-10 +``` + diff --git a/md/134.md b/md/134.md index e69de29b..ba0f87f3 100644 --- a/md/134.md +++ b/md/134.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/01 +``` + \ No newline at end of file diff --git a/md/135.md b/md/135.md index e69de29b..fdb7a4bb 100644 --- a/md/135.md +++ b/md/135.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/02 +``` + \ No newline at end of file diff --git a/md/136.md b/md/136.md index e69de29b..63826006 100644 --- a/md/136.md +++ b/md/136.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/03 +``` + \ No newline at end of file diff --git a/md/137.md b/md/137.md index e69de29b..958efe5b 100644 --- a/md/137.md +++ b/md/137.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/04 +``` + \ No newline at end of file diff --git a/md/138.md b/md/138.md index e69de29b..d2580dcc 100644 --- a/md/138.md +++ b/md/138.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/05 +``` + \ No newline at end of file diff --git a/md/139.md b/md/139.md index e69de29b..133afa18 100644 --- a/md/139.md +++ b/md/139.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/06 +``` + \ No newline at end of file diff --git a/md/140.md b/md/140.md index e69de29b..c7e8d5f1 100644 --- a/md/140.md +++ b/md/140.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/07 +``` + \ No newline at end of file diff --git a/md/141.md b/md/141.md index e69de29b..b27df135 100644 --- a/md/141.md +++ b/md/141.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/08 +``` + \ No newline at end of file diff --git a/md/142.md b/md/142.md index e69de29b..7e392203 100644 --- a/md/142.md +++ b/md/142.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/09 +``` + \ No newline at end of file diff --git a/md/143.md b/md/143.md index e69de29b..11c832b2 100644 --- a/md/143.md +++ b/md/143.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/10 +``` + \ No newline at end of file diff --git a/md/144.md b/md/144.md index e69de29b..75f71cf0 100644 --- a/md/144.md +++ b/md/144.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/11 +``` + \ No newline at end of file diff --git a/md/145.md b/md/145.md index e69de29b..ebc5ebd7 100644 --- a/md/145.md +++ b/md/145.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/12 +``` + \ No newline at end of file diff --git a/md/146.md b/md/146.md index e69de29b..5c733d20 100644 --- a/md/146.md +++ b/md/146.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/13 +``` + \ No newline at end of file diff --git a/md/147.md b/md/147.md index e69de29b..c0c6c2fc 100644 --- a/md/147.md +++ b/md/147.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/14 +``` + \ No newline at end of file diff --git a/md/148.md b/md/148.md index e69de29b..dbd5660b 100644 --- a/md/148.md +++ b/md/148.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/15 +``` + \ No newline at end of file diff --git a/md/149.md b/md/149.md index e69de29b..3ebbcaaa 100644 --- a/md/149.md +++ b/md/149.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/16 +``` + \ No newline at end of file diff --git a/md/150.md b/md/150.md index e69de29b..a6ab7097 100644 --- a/md/150.md +++ b/md/150.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/17 +``` + \ No newline at end of file diff --git a/md/151.md b/md/151.md index e69de29b..2c83f927 100644 --- a/md/151.md +++ b/md/151.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/18 +``` + \ No newline at end of file diff --git a/md/152.md b/md/152.md index e69de29b..5465db09 100644 --- a/md/152.md +++ b/md/152.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/19 +``` + \ No newline at end of file diff --git a/md/153.md b/md/153.md index e69de29b..584675d3 100644 --- a/md/153.md +++ b/md/153.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/20 +``` + \ No newline at end of file diff --git a/md/154.md b/md/154.md index e69de29b..cf1386d9 100644 --- a/md/154.md +++ b/md/154.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/21 +``` + \ No newline at end of file diff --git a/md/155.md b/md/155.md index e69de29b..46f11fc0 100644 --- a/md/155.md +++ b/md/155.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/22 +``` + \ No newline at end of file diff --git a/md/156.md b/md/156.md index e69de29b..d980c9b0 100644 --- a/md/156.md +++ b/md/156.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/23 +``` + \ No newline at end of file diff --git a/md/157.md b/md/157.md index e69de29b..2370c304 100644 --- a/md/157.md +++ b/md/157.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/24 +``` + \ No newline at end of file diff --git a/md/158.md b/md/158.md index e69de29b..aefa460c 100644 --- a/md/158.md +++ b/md/158.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/25 +``` + \ No newline at end of file diff --git a/md/159.md b/md/159.md index e69de29b..1e0bca8c 100644 --- a/md/159.md +++ b/md/159.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/26 +``` + \ No newline at end of file diff --git a/md/160.md b/md/160.md index e69de29b..ea0c8e87 100644 --- a/md/160.md +++ b/md/160.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/27 +``` + \ No newline at end of file diff --git a/md/161.md b/md/161.md index e69de29b..f2c9a0ff 100644 --- a/md/161.md +++ b/md/161.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/28 +``` + \ No newline at end of file diff --git a/md/162.md b/md/162.md index e69de29b..31303dc1 100644 --- a/md/162.md +++ b/md/162.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/02/29 +``` + \ No newline at end of file diff --git a/md/163.md b/md/163.md index e69de29b..8984c671 100644 --- a/md/163.md +++ b/md/163.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/01 +``` + \ No newline at end of file diff --git a/md/164.md b/md/164.md index e69de29b..4caf8427 100644 --- a/md/164.md +++ b/md/164.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/02 +``` + \ No newline at end of file diff --git a/md/165.md b/md/165.md index e69de29b..8ecb94da 100644 --- a/md/165.md +++ b/md/165.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/03 +``` + \ No newline at end of file diff --git a/md/166.md b/md/166.md index e69de29b..39bc8de4 100644 --- a/md/166.md +++ b/md/166.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/04 +``` + \ No newline at end of file diff --git a/md/167.md b/md/167.md index e69de29b..f487cd25 100644 --- a/md/167.md +++ b/md/167.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/05 +``` + \ No newline at end of file diff --git a/md/168.md b/md/168.md index e69de29b..0d595500 100644 --- a/md/168.md +++ b/md/168.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/06 +``` + \ No newline at end of file diff --git a/md/169.md b/md/169.md index e69de29b..5cb53192 100644 --- a/md/169.md +++ b/md/169.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/07 +``` + \ No newline at end of file diff --git a/md/170.md b/md/170.md index e69de29b..5ea4e0b6 100644 --- a/md/170.md +++ b/md/170.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/08 +``` + \ No newline at end of file diff --git a/md/171.md b/md/171.md index e69de29b..32c469c3 100644 --- a/md/171.md +++ b/md/171.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/09 +``` + \ No newline at end of file diff --git a/md/172.md b/md/172.md index e69de29b..b6ede7f6 100644 --- a/md/172.md +++ b/md/172.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/10 +``` + \ No newline at end of file diff --git a/md/173.md b/md/173.md index e69de29b..fb928e5e 100644 --- a/md/173.md +++ b/md/173.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/11 +``` + \ No newline at end of file diff --git a/md/174.md b/md/174.md index e69de29b..89c95f07 100644 --- a/md/174.md +++ b/md/174.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/12 +``` + \ No newline at end of file diff --git a/md/175.md b/md/175.md index e69de29b..4cdcac42 100644 --- a/md/175.md +++ b/md/175.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/13 +``` + \ No newline at end of file diff --git a/md/176.md b/md/176.md index e69de29b..29cd02af 100644 --- a/md/176.md +++ b/md/176.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/14 +``` + \ No newline at end of file diff --git a/md/177.md b/md/177.md index e69de29b..d8aa8b99 100644 --- a/md/177.md +++ b/md/177.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/15 +``` + \ No newline at end of file diff --git a/md/178.md b/md/178.md index e69de29b..ab8bedc6 100644 --- a/md/178.md +++ b/md/178.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/16 +``` + \ No newline at end of file diff --git a/md/179.md b/md/179.md index e69de29b..dc854b7c 100644 --- a/md/179.md +++ b/md/179.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/17 +``` + \ No newline at end of file diff --git a/md/180.md b/md/180.md index e69de29b..1b90c889 100644 --- a/md/180.md +++ b/md/180.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/18 +``` + \ No newline at end of file diff --git a/md/181.md b/md/181.md index e69de29b..f40d1e6b 100644 --- a/md/181.md +++ b/md/181.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/19 +``` + \ No newline at end of file diff --git a/md/182.md b/md/182.md index e69de29b..f47d021c 100644 --- a/md/182.md +++ b/md/182.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/20 +``` + \ No newline at end of file diff --git a/md/183.md b/md/183.md index e69de29b..c3f30e87 100644 --- a/md/183.md +++ b/md/183.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/21 +``` + \ No newline at end of file diff --git a/md/184.md b/md/184.md index e69de29b..19de42e2 100644 --- a/md/184.md +++ b/md/184.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/22 +``` + \ No newline at end of file diff --git a/md/185.md b/md/185.md index e69de29b..56f2c1d2 100644 --- a/md/185.md +++ b/md/185.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/23 +``` + \ No newline at end of file diff --git a/md/186.md b/md/186.md index e69de29b..4557b5ee 100644 --- a/md/186.md +++ b/md/186.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/24 +``` + \ No newline at end of file diff --git a/md/187.md b/md/187.md index e69de29b..e14ce6b1 100644 --- a/md/187.md +++ b/md/187.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/25 +``` + \ No newline at end of file diff --git a/md/188.md b/md/188.md index e69de29b..83c353b5 100644 --- a/md/188.md +++ b/md/188.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/26 +``` + \ No newline at end of file diff --git a/md/189.md b/md/189.md index e69de29b..4ba24e01 100644 --- a/md/189.md +++ b/md/189.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/27 +``` + \ No newline at end of file diff --git a/md/190.md b/md/190.md index e69de29b..d76fcb7d 100644 --- a/md/190.md +++ b/md/190.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/28 +``` + \ No newline at end of file diff --git a/md/191.md b/md/191.md index e69de29b..c1de5a3b 100644 --- a/md/191.md +++ b/md/191.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/29 +``` + \ No newline at end of file diff --git a/md/192.md b/md/192.md index e69de29b..de3f35db 100644 --- a/md/192.md +++ b/md/192.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/30 +``` + \ No newline at end of file diff --git a/md/193.md b/md/193.md index e69de29b..03608d08 100644 --- a/md/193.md +++ b/md/193.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/03/31 +``` + \ No newline at end of file diff --git a/md/194.md b/md/194.md index e69de29b..38807c7f 100644 --- a/md/194.md +++ b/md/194.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/01 +``` + \ No newline at end of file diff --git a/md/195.md b/md/195.md index e69de29b..b81246d8 100644 --- a/md/195.md +++ b/md/195.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/02 +``` + \ No newline at end of file diff --git a/md/196.md b/md/196.md index e69de29b..f3dfe76f 100644 --- a/md/196.md +++ b/md/196.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/03 +``` + \ No newline at end of file diff --git a/md/197.md b/md/197.md index e69de29b..6564e6fc 100644 --- a/md/197.md +++ b/md/197.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/04 +``` + \ No newline at end of file diff --git a/md/198.md b/md/198.md index e69de29b..54af1fb6 100644 --- a/md/198.md +++ b/md/198.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/05 +``` + \ No newline at end of file diff --git a/md/199.md b/md/199.md index e69de29b..b6f23790 100644 --- a/md/199.md +++ b/md/199.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/06 +``` + \ No newline at end of file diff --git a/md/200.md b/md/200.md new file mode 100644 index 00000000..bd31655d --- /dev/null +++ b/md/200.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/07 +``` + \ No newline at end of file diff --git a/md/201.md b/md/201.md new file mode 100644 index 00000000..0ecfc0fe --- /dev/null +++ b/md/201.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/08 +``` + \ No newline at end of file diff --git a/md/202.md b/md/202.md new file mode 100644 index 00000000..79489391 --- /dev/null +++ b/md/202.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/09 +``` + \ No newline at end of file diff --git a/md/203.md b/md/203.md new file mode 100644 index 00000000..13ebb419 --- /dev/null +++ b/md/203.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/10 +``` + \ No newline at end of file diff --git a/md/204.md b/md/204.md new file mode 100644 index 00000000..40d77782 --- /dev/null +++ b/md/204.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/11 +``` + \ No newline at end of file diff --git a/md/205.md b/md/205.md new file mode 100644 index 00000000..819a1c9f --- /dev/null +++ b/md/205.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/12 +``` + \ No newline at end of file diff --git a/md/206.md b/md/206.md new file mode 100644 index 00000000..e813bb54 --- /dev/null +++ b/md/206.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/13 +``` + \ No newline at end of file diff --git a/md/207.md b/md/207.md new file mode 100644 index 00000000..a7ddeac8 --- /dev/null +++ b/md/207.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/14 +``` + \ No newline at end of file diff --git a/md/208.md b/md/208.md new file mode 100644 index 00000000..1b3371ee --- /dev/null +++ b/md/208.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/15 +``` + \ No newline at end of file diff --git a/md/209.md b/md/209.md new file mode 100644 index 00000000..9ec7d645 --- /dev/null +++ b/md/209.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/16 +``` + \ No newline at end of file diff --git a/md/210.md b/md/210.md new file mode 100644 index 00000000..a1ae84b0 --- /dev/null +++ b/md/210.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/17 +``` + \ No newline at end of file diff --git a/md/211.md b/md/211.md new file mode 100644 index 00000000..83029be4 --- /dev/null +++ b/md/211.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/18 +``` + \ No newline at end of file diff --git a/md/212.md b/md/212.md new file mode 100644 index 00000000..cb1bf8b8 --- /dev/null +++ b/md/212.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/19 +``` + \ No newline at end of file diff --git a/md/213.md b/md/213.md new file mode 100644 index 00000000..63d6816c --- /dev/null +++ b/md/213.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/20 +``` + \ No newline at end of file diff --git a/md/214.md b/md/214.md new file mode 100644 index 00000000..cc93ab36 --- /dev/null +++ b/md/214.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/21 +``` + \ No newline at end of file diff --git a/md/215.md b/md/215.md new file mode 100644 index 00000000..5bab8514 --- /dev/null +++ b/md/215.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/22 +``` + \ No newline at end of file diff --git a/md/216.md b/md/216.md new file mode 100644 index 00000000..36b5f3d4 --- /dev/null +++ b/md/216.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/23 +``` + \ No newline at end of file diff --git a/md/217.md b/md/217.md new file mode 100644 index 00000000..bd89698c --- /dev/null +++ b/md/217.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/24 +``` + \ No newline at end of file diff --git a/md/218.md b/md/218.md new file mode 100644 index 00000000..6d7349b5 --- /dev/null +++ b/md/218.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/25 +``` + \ No newline at end of file diff --git a/md/219.md b/md/219.md new file mode 100644 index 00000000..e62584a2 --- /dev/null +++ b/md/219.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/26 +``` + \ No newline at end of file diff --git a/md/220.md b/md/220.md new file mode 100644 index 00000000..f9390a55 --- /dev/null +++ b/md/220.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/27 +``` + \ No newline at end of file diff --git a/md/221.md b/md/221.md new file mode 100644 index 00000000..be4076dc --- /dev/null +++ b/md/221.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/28 +``` + \ No newline at end of file diff --git a/md/222.md b/md/222.md new file mode 100644 index 00000000..cc1acb6e --- /dev/null +++ b/md/222.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/29 +``` + \ No newline at end of file diff --git a/md/223.md b/md/223.md new file mode 100644 index 00000000..8467de00 --- /dev/null +++ b/md/223.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/04/30 +``` + \ No newline at end of file diff --git a/md/224.md b/md/224.md new file mode 100644 index 00000000..1350f6d8 --- /dev/null +++ b/md/224.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/05/01 +``` + \ No newline at end of file diff --git a/md/225.md b/md/225.md new file mode 100644 index 00000000..e5265707 --- /dev/null +++ b/md/225.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/05/02 +``` + \ No newline at end of file diff --git a/md/226.md b/md/226.md new file mode 100644 index 00000000..03501fe0 --- /dev/null +++ b/md/226.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/05/03 +``` + \ No newline at end of file diff --git a/md/227.md b/md/227.md new file mode 100644 index 00000000..70486d56 --- /dev/null +++ b/md/227.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/05/04 +``` + \ No newline at end of file diff --git a/md/228.md b/md/228.md new file mode 100644 index 00000000..0963c4dc --- /dev/null +++ b/md/228.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/05/05 +``` + \ No newline at end of file diff --git a/md/229.md b/md/229.md new file mode 100644 index 00000000..2ac03b6e --- /dev/null +++ b/md/229.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/05/06 +``` + \ No newline at end of file diff --git a/md/230.md b/md/230.md new file mode 100644 index 00000000..383df973 --- /dev/null +++ b/md/230.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/05/07 +``` + \ No newline at end of file diff --git a/md/231.md b/md/231.md new file mode 100644 index 00000000..ce09e38f --- /dev/null +++ b/md/231.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/05/08 +``` + \ No newline at end of file diff --git a/md/232.md b/md/232.md new file mode 100644 index 00000000..0fe7f0a3 --- /dev/null +++ b/md/232.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/05/09 +``` + \ No newline at end of file diff --git a/md/233.md b/md/233.md new file mode 100644 index 00000000..8aa98ec3 --- /dev/null +++ b/md/233.md @@ -0,0 +1,9 @@ + +```markdown +@author jackzhenguo +@desc +@tag +@version +@date 2020/05/10 +``` + \ No newline at end of file diff --git a/md/__pycache__/batch.cpython-37.pyc b/md/__pycache__/batch.cpython-37.pyc index c0ef01a1..a5bd4868 100644 Binary files a/md/__pycache__/batch.cpython-37.pyc and b/md/__pycache__/batch.cpython-37.pyc differ diff --git a/md/batch.py b/md/batch.py index 8ed211ae..f4db6f83 100644 --- a/md/batch.py +++ b/md/batch.py @@ -1,14 +1,47 @@ -def batchCreate(ps='.md',start=100,n=100,path='.'): - import os - import calendar - for i in range(start,start+n): +""" +@author jackzhenguo +@desc 批量生成模板文件 +@tag datetime file +@version v1.2 +@date 2020/8/23 +""" + +import os +import calendar +from datetime import date,datetime + +def getEverydaySince(year,month,day,n=10): + i = 0 + _, days = calendar.monthrange(year, month) + while i < n: + d = date(year,month,day) + if day == days: + month,day = month+1,0 + _, days = calendar.monthrange(year, month) + if month == 13: + year,month = year+1,1 + _, days = calendar.monthrange(year, month) + yield d + day += 1 + i += 1 + + +def batchCreate(ps='.md',start=100,n=100,path='.',year=2020,month=2,day=1): + + for i,day in zip(range(start,start+n),\ + getEverydaySince(year,month,day,n) \ + ): with open(path+'/'+str(i)+ps,'w') as fw: fw.write(""" - ```markdown - @author jackzhenguo - @desc - @date 2020/1/1 - ``` - """.format() +```markdown +@author jackzhenguo +@desc +@tag +@version +@date {} +``` + """.format(datetime.strftime(day,'%Y/%m/%d'))\ + ) + print(day) print('done')