chore: added a docstring for the get_next_schedule_date method
This commit is contained in:
parent
4c1756b3d6
commit
7d70e552aa
1 changed files with 7 additions and 0 deletions
|
|
@ -219,6 +219,13 @@ class AutoRepeat(Document):
|
|||
new_doc.set('to_date', to_date)
|
||||
|
||||
def get_next_schedule_date(self, schedule_date, for_full_schedule=False):
|
||||
"""
|
||||
Returns the next schedule date for auto repeat after a recurring document has been created.
|
||||
Adds required offset to the schedule_date param and returns the next schedule date.
|
||||
|
||||
:param schedule_date: The date when the last recurring document was created.
|
||||
:param for_full_schedule: If True, returns the immediate next schedule date, else the full schedule.
|
||||
"""
|
||||
if month_map.get(self.frequency):
|
||||
month_count = month_map.get(self.frequency) + month_diff(schedule_date, self.start_date) - 1
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue