inmydata.CalendarAssistant module

class inmydata.CalendarAssistant.CalendarAssistant(tenant: str, calendar_name: str, server: str = 'inmydata.com', logging_level=20, log_file: str | None = None)

Bases: object

class DateDetails(year: int, month: int, week: int, quarter: int, yearseq: int, monthseq: int, weekseq: int, quarterseq: int, yearid: int, monthid: int, weekid: int, quarterid: int, date: date)

Bases: object

toJSON()
class GetCalendarDetailsRequest(UseDate, CalendarName)

Bases: object

toJSON()
class GetCalendarDetailsResponse(dateDetails)

Bases: object

toJSON()
get_financial_periods(input_date: date) FinancialPeriodDetails

Returns the financial period (year, month, week, quarter) for the given date.

get_financial_year(input_date: date) int

Returns the financial year (based on the anniversary of the custom start date).

get_month(input_date: date) int

Returns the pseudo-month (1–12) as 4-week periods in the financial year.

get_quarter(input_date: date) int

Returns the quarter (1–4) in the current financial year.

get_week_number(input_date: date) int

Week number (1–53) in the current financial year.

class inmydata.CalendarAssistant.FinancialPeriodDetails(year: int, month: int, week: int, quarter: int)

Bases: object