template-archive
template-archive copied to clipboard
Support for Working Days in contracts
many contracts make reference to 'Working Days', this can be important for calculating penalties and service level agreements etc. While this may be difficult to implement as each country has its own definition of what is a working day and also moveable public holidays, this would be a very welcome feature enhancement to support.
Hi @niallroche, I wonder if it's too restrictive for Cicero to make an assumption about what a working day is. Even if we could reliably determine the normal working week by locale, I suspect that there will always be exceptions.
For example, where the agreement defines non-standard working days (e.g. Tuesday to Saturday), or exceptional public holidays (e.g. a royal wedding).
Instead, perhaps we could fulfil this requirement by permitting template authors to specify explicitly what working day and public holiday schedule they wish to use?
This library has some useful primitives, https://www.npmjs.com/package/moment-business-days
Maybe QuantLib would be useful? https://www.quantlib.org/quantlibxl/func_calendar.html.
There is a JS version - https://www.npmjs.com/package/quantlib