Skip to content

Commit

Permalink
cr
Browse files Browse the repository at this point in the history
  • Loading branch information
radeusgd committed Sep 21, 2022
1 parent 7adf4c1 commit de5d72d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ type Date

from Standard.Base import Date

example_workdays = Date.new 2020 1 1 . workdays_until (Date.new 2020 1 5)
example_workdays = Date.new 2020 1 1 . work_days_until (Date.new 2020 1 5)
work_days_until : Date -> Vector Date -> Boolean -> Integer
work_days_until self end holidays=[] include_end_date=False =
if include_end_date then self.work_days_until (end + 1.day) holidays include_end_date=False else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,7 @@ type Date_Time
example_shift = Date_Time.new 2020 2 3 11 45 . add_work_days 5
add_work_days : Integer -> Vector Date -> Date_Time
add_work_days self days=1 holidays=[] =
diff = Time_Utils.days_between self.date (self.date.add_work_days days holidays)
self + diff.days
self.date.add_work_days days holidays . to_date_time self.time_of_day self.zone

## Subtract the specified amount of time from this instant to get a new
instant.
Expand Down

0 comments on commit de5d72d

Please sign in to comment.