Skip to content

Commit c529629

Browse files
committed
improve object description in readme.md
1 parent 5bd5150 commit c529629

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,29 @@
44
<img src="https://github.com/ScottBoyce-Python/DateIntervalCycler/actions/workflows/python-pytest.yml/badge.svg" alt="Build Status" height="20">
55
</p>
66

7-
DateIntervalCycler is a Python class that cycles through datetime intervals based on provided (month, day) tuples. Intervals can be cycled through using a next and back methods or as an iterator within a loop. Specific intervals can be queried with an index or containing date. Lastly, the entire interval series can be converted to a list of tuples.
7+
DateIntervalCycler is a Python object that cycles through datetime intervals based on provided (month, day) tuples. Intervals can be cycled through using a next and back methods or as an iterator within a loop. Specific intervals can be queried with an index or containing date. Lastly, the entire interval series can be converted to a list of tuples or list of the start date for each interval.
88

9-
If cycles contains (2, 29), then it will honor leap years by setting the interval date time (2, 28) for non-leap years. However, if the cycles contains both (2, 28) and (2, 29), then it will skip using (2, 29) for non-leap years.
10-
11-
This class is used to generate a datetime series of intervals that follow the user specified interval cycles.
9+
The list of (month, day) tuples is called the "cycles". If cycles contains (2, 29), then it will honor leap years by setting the interval date time (2, 28) for non-leap years. However, if the cycles contains both (2, 28) and (2, 29), then it will skip using (2, 29) for non-leap years as the interval from Feb-28 to Feb-29 does not exist. If cycles only contains (2, 28), then the object functions as normal with generating intervals.
1210

1311

1412

1513
## Installation
1614
To install the module
17-
```
15+
```bash
1816
pip install --upgrade git+https://github.com/ScottBoyce-Python/DateIntervalCycler.git
1917
```
2018

2119
or you can clone the respository with
22-
```
20+
```bash
2321
git clone https://github.com/ScottBoyce-Python/DateIntervalCycler.git
2422
```
2523
and then move the file `DateIntervalCycler/DateIntervalCycler.py` to wherever you want to use it.
2624

25+
If you want to install the numpy version of the module (not recommended), then run the command:
26+
```bash
27+
pip install git+https://github.com/ScottBoyce-Python/DateIntervalCycler@numpy-dep
28+
```
29+
2730

2831
## Usage
2932
DateIntervalCycler `with_` constructors example:

0 commit comments

Comments
 (0)