You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per the recommendation from @RomanShestakov, add business day arithmetic.
This will require either accepting a list of business days, or more likely, have a predicate function passed to it which would evaluate whether or not a date is a business day.
This would work with the Modifier in #1 by adding three new date units: business_day and business_week, business_month
business_day would check each day, only decrementing the counter if the day is actually a business day.
business_week will increment like a normal week, and then continue incrementing each day until it finds the first business day. Example: Assume today is monday, and next monday is a holiday: 1 business week would be next tuesday, while 2 business weeks would just be two mondays from now.
business_month will work exactly like business_week, except it increments the month.
In short: business_week and business_month would do valid-business-day checks only at the end, while business_day does one for each day.
The text was updated successfully, but these errors were encountered:
Per the recommendation from @RomanShestakov, add business day arithmetic.
This will require either accepting a list of business days, or more likely, have a predicate function passed to it which would evaluate whether or not a date is a business day.
This would work with the Modifier in #1 by adding three new date units: business_day and business_week, business_month
business_day would check each day, only decrementing the counter if the day is actually a business day.
business_week will increment like a normal week, and then continue incrementing each day until it finds the first business day. Example: Assume today is monday, and next monday is a holiday: 1 business week would be next tuesday, while 2 business weeks would just be two mondays from now.
business_month will work exactly like business_week, except it increments the month.
In short: business_week and business_month would do valid-business-day checks only at the end, while business_day does one for each day.
—
Reply to this email directly or view it on GitHub.
Per the recommendation from @RomanShestakov, add business day arithmetic.
This will require either accepting a list of business days, or more likely, have a predicate function passed to it which would evaluate whether or not a date is a business day.
This would work with the
Modifier
in #1 by adding three new date units:business_day
andbusiness_week
,business_month
business_day
would check each day, only decrementing the counter if the day is actually a business day.business_week
will increment like a normal week, and then continue incrementing each day until it finds the first business day. Example: Assume today is monday, and next monday is a holiday: 1 business week would be next tuesday, while 2 business weeks would just be two mondays from now.business_month
will work exactly likebusiness_week
, except it increments the month.In short:
business_week
andbusiness_month
would do valid-business-day checks only at the end, whilebusiness_day
does one for each day.The text was updated successfully, but these errors were encountered: