From 88823294bf8f529a3173eba05faad7b4f0de4f4f Mon Sep 17 00:00:00 2001 From: Elliot Hughes Date: Thu, 12 Apr 2018 20:18:47 -0400 Subject: 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 Co-authored-by: Kevin Nguyen --- dateutil/relativedelta.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'dateutil/relativedelta.py') 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 -- cgit v1.2.3