Skip to content

Commit

Permalink
Update README (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondjavaxx committed Mar 7, 2024
1 parent c68fbb6 commit 1125155
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Expand Up @@ -54,6 +54,15 @@ for ym in YearMonth.range(ym1, ym2):
print(ym) # 2019-01, 2019-02, 2019-03
```

Calculate the distance between two year-months:

```python
ym1 = YearMonth(2019, 1)
ym2 = YearMonth(2019, 3)

distance = ym1.distance_to(ym2) # 2
```

## License

mp-yearmonth is licensed under the MIT license. See [LICENSE](https://github.com/raymondjavaxx/mp-yearmonth/blob/main/LICENSE) for details.

0 comments on commit 1125155

Please sign in to comment.