template-archive icon indicating copy to clipboard operation
template-archive copied to clipboard

Support for Working Days in contracts

Open niallroche opened this issue 6 years ago • 2 comments

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.

niallroche avatar Jul 22 '19 21:07 niallroche

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

mttrbrts avatar Jul 23 '19 09:07 mttrbrts

Maybe QuantLib would be useful? https://www.quantlib.org/quantlibxl/func_calendar.html.

There is a JS version - https://www.npmjs.com/package/quantlib

magick93 avatar Jul 26 '19 10:07 magick93