diff options
author | Elliot Hughes <elliot.hughes@gmail.com> | 2018-04-12 20:18:47 -0400 |
---|---|---|
committer | Paul Ganssle <paul@ganssle.io> | 2018-04-15 20:53:03 -0400 |
commit | 88823294bf8f529a3173eba05faad7b4f0de4f4f (patch) | |
tree | 456eb1fc56569b173f2fc5d2a6d36076cd17511c /dateutil/relativedelta.py | |
parent | b7db2313dfa7a3c0d43534c4f00cf8ef4a754485 (diff) | |
download | dateutil-88823294bf8f529a3173eba05faad7b4f0de4f4f.tar.gz |
Explain effect of weekday(_, 1) on relativedelta
This is referenced in paragraph 7 of the docstring but is easy to miss
and we intend to change it.
Authored with:
- @kvm219
- @huangy22
Co-authored-by: Yuan Huang <huangy22@gmail.com>
Co-authored-by: Kevin Nguyen <kvn219@nyu.edu>
Diffstat (limited to 'dateutil/relativedelta.py')
-rw-r--r-- | dateutil/relativedelta.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/dateutil/relativedelta.py b/dateutil/relativedelta.py index 584ed5a..3353851 100644 --- a/dateutil/relativedelta.py +++ b/dateutil/relativedelta.py @@ -44,12 +44,14 @@ class relativedelta(object): the corresponding aritmetic operation on the original datetime value with the information in the relativedelta. - weekday: - One of the weekday instances (MO, TU, etc). These instances may - receive a parameter N, specifying the Nth weekday, which could - be positive or negative (like MO(+1) or MO(-2). Not specifying - it is the same as specifying +1. You can also use an integer, - where 0=MO. + weekday: + One of the weekday instances (MO, TU, etc). These + instances may receive a parameter N, specifying the Nth + weekday, which could be positive or negative (like MO(+1) + or MO(-2). Not specifying it is the same as specifying + +1. You can also use an integer, where 0=MO. Notice that + if the calculated date is already Monday, for example, + using MO(1) or MO(-1) won't change the day. leapdays: Will add given days to the date found, if year is a leap |