Calendar and Date Operators

Tooling that deals with calendars and dates.

These items are found in the module hg_systematic.operators.

Calendars

These services, operators and data structures related to working with Calendar data.

class HolidayCalendarSchema[source]

The schema is to track holidays and the start and end of the week. With the days between start of week and end of week being weekends or non-working days. If this is not appropriate the logic should also be able to cope with no-weekends specified (i.e. sow and eow being monday and sunday respectively) and any actual weekends being encoded in the holidays. This supports a more flexible specification that supports weekends shifting (as is the case with the UAE recently). Alternatively the calendar could be adjusted using the point-in-time of the engine clock and adjusting the sow and eow time-series values as appropriate. This is an implementation choice and needs to be clearly specified so the user can make an appropriate decision.

calendar_for(*args, **kwargs)

A service interface stub (hgraph’s service decorators): calling it wires a CLIENT; register_service registers an implementation.

operators.HolidayCalendar = TSB[HolidayCalendarSchema]