Skip to content

Commit

Permalink
go
Browse files Browse the repository at this point in the history
  • Loading branch information
jackzhenguo committed Aug 23, 2020
1 parent 760683e commit 87e1148
Show file tree
Hide file tree
Showing 104 changed files with 980 additions and 10 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | ⭐️⭐️⭐️ |

更多例子正在整理发布中......
36 changes: 36 additions & 0 deletions md/133.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

9 changes: 9 additions & 0 deletions md/134.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/01
```
9 changes: 9 additions & 0 deletions md/135.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/02
```
9 changes: 9 additions & 0 deletions md/136.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/03
```
9 changes: 9 additions & 0 deletions md/137.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/04
```
9 changes: 9 additions & 0 deletions md/138.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/05
```
9 changes: 9 additions & 0 deletions md/139.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/06
```
9 changes: 9 additions & 0 deletions md/140.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/07
```
9 changes: 9 additions & 0 deletions md/141.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/08
```
9 changes: 9 additions & 0 deletions md/142.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/09
```
9 changes: 9 additions & 0 deletions md/143.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/10
```
9 changes: 9 additions & 0 deletions md/144.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/11
```
9 changes: 9 additions & 0 deletions md/145.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/12
```
9 changes: 9 additions & 0 deletions md/146.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/13
```
9 changes: 9 additions & 0 deletions md/147.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/14
```
9 changes: 9 additions & 0 deletions md/148.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/15
```
9 changes: 9 additions & 0 deletions md/149.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/16
```
9 changes: 9 additions & 0 deletions md/150.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/17
```
9 changes: 9 additions & 0 deletions md/151.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/18
```
9 changes: 9 additions & 0 deletions md/152.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/19
```
9 changes: 9 additions & 0 deletions md/153.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/20
```
9 changes: 9 additions & 0 deletions md/154.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/21
```
9 changes: 9 additions & 0 deletions md/155.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/22
```
9 changes: 9 additions & 0 deletions md/156.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/23
```
9 changes: 9 additions & 0 deletions md/157.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/24
```
9 changes: 9 additions & 0 deletions md/158.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/25
```
9 changes: 9 additions & 0 deletions md/159.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/26
```
9 changes: 9 additions & 0 deletions md/160.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/27
```
9 changes: 9 additions & 0 deletions md/161.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/28
```
9 changes: 9 additions & 0 deletions md/162.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/02/29
```
9 changes: 9 additions & 0 deletions md/163.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/03/01
```
9 changes: 9 additions & 0 deletions md/164.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/03/02
```
9 changes: 9 additions & 0 deletions md/165.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

```markdown
@author jackzhenguo
@desc
@tag
@version
@date 2020/03/03
```
Loading

0 comments on commit 87e1148

Please sign in to comment.