arelle.ModelValue
¶
See COPYRIGHT.md for copyright information.
Module Contents¶
Classes¶
.. class:: IsoDuration(modelDocument) |
|
Functions¶
(str) – Text of contained (inner) text nodes except for any whose localName starts with URI, for label and reference parts displaying purposes. (Footnotes, which return serialized html content of footnote.) |
Data¶
XPath 2.0 does not define arithmetic operations on xs:duration for arithmetic one must use xs:yearMonthDuration or xs:dayTimeDuration instead |
|
API¶
- arelle.ModelValue.XmlUtil¶
None
- arelle.ModelValue.qname(value: arelle.ModelObject.ModelObject | str | QName | Any | None, name: str | QName | arelle.ModelObject.ModelObject | dict[str, str] | None = None, noPrefixIsNoNamespace: bool = False, castException: Exception | None = None, prefixException: Exception | None = None) QName | None ¶
- arelle.ModelValue.qnameEltPfxName(element: arelle.ModelDtsObject.ModelConcept | arelle.ModelDtsObject.ModelAttribute | arelle.ModelFormulaObject.ModelCustomFunctionSignature | arelle.ModelDtsObject.ModelType | arelle.ModelInstanceObject.ModelInlineFact | arelle.ModelObject.ModelObject, prefixedName: str, prefixException: type[Exception] | None = None) QName | None ¶
- arelle.ModelValue._conformsQname(possibleQname: Any) bool ¶
- arelle.ModelValue._qnameCompareValue(namespaceURI: str | None, localName: str | None) tuple[str, str] ¶
- class arelle.ModelValue.QName(prefix: str | None, namespaceURI: str | None, localName: str)¶
Initialization
- __slots__¶
(‘prefix’, ‘namespaceURI’, ‘localName’, ‘qnameValueHash’)
- __hash__() int ¶
- property clarkNotation: str¶
- property expandedName: str¶
- __repr__() str ¶
- __str__() str ¶
- __eq__(other: Any) bool ¶
- __lt__(other: Any) bool ¶
- __le__(other: Any) bool ¶
- __gt__(other: Any) bool ¶
- __ge__(other: Any) bool ¶
- __bool__() bool ¶
- class arelle.ModelValue.AnyURI¶
Bases:
str
- __new__(value: str) arelle.ModelValue.AnyURI ¶
- arelle.ModelValue.datetimePattern¶
‘compile(…)’
- arelle.ModelValue.timePattern¶
‘compile(…)’
- arelle.ModelValue.durationPattern¶
‘compile(…)’
- arelle.ModelValue.DATE¶
1
- arelle.ModelValue.DATETIME¶
2
- arelle.ModelValue.DATEUNION¶
3
- arelle.ModelValue.tzinfo(tz: str | None) datetime.timezone | None ¶
- arelle.ModelValue.tzinfoStr(dt: datetime.datetime) str ¶
- arelle.ModelValue.dateTime(value: str | arelle.ModelObject.ModelObject | DateTime | datetime.datetime | datetime.date | None, time: Any = None, addOneDay: bool = False, type: int | None = None, castException: arelle.ModelValue.dateTime.type[Exception] | None = None) DateTime | None ¶
- arelle.ModelValue.lastDayOfMonth(year: int, month: int) int ¶
- class arelle.ModelValue.DateTime¶
Bases:
datetime.datetime
- dateOnly: bool¶
None
- __new__(y: int, m: int, d: int, hr: int = 0, min: int = 0, sec: int = 0, microsec: int = 0, tzinfo: datetime.tzinfo | None = None, dateOnly: bool = False, addOneDay: bool = False) arelle.ModelValue.DateTime ¶
- __copy__() arelle.ModelValue.DateTime ¶
- __str__() str ¶
- addYearMonthDuration(other: arelle.ModelValue.YearMonthDuration, sign: int) arelle.ModelValue.DateTime ¶
- __add__(other: Any) arelle.ModelValue.DateTime ¶
- __sub__(other: Any) arelle.ModelValue.DateTime | arelle.ModelValue.DayTimeDuration ¶
- arelle.ModelValue.dateUnionEqual(dateUnion1: arelle.ModelValue.DateTime | datetime.date, dateUnion2: arelle.ModelValue.DateTime | datetime.date, instantEndDate: bool = False) bool ¶
- arelle.ModelValue.dateunionDate(datetimeValue: datetime.date, subtractOneDay: bool = False) datetime.date ¶
- arelle.ModelValue.yearMonthDuration(value: str) YearMonthDuration ¶
- class arelle.ModelValue.YearMonthDuration(years: int, months: int)¶
Initialization
- __repr__() str ¶
- __str__() str ¶
- arelle.ModelValue.dayTimeDuration(value: Time | datetime.timedelta | str) DayTimeDuration ¶
- class arelle.ModelValue.DayTimeDuration¶
Bases:
datetime.timedelta
- __new__(days: int, hours: int, minutes: int, seconds: int) arelle.ModelValue.DayTimeDuration ¶
- dayHrsMinsSecs() tuple[int, int, int, int] ¶
- __repr__() str ¶
- __str__() str ¶
- arelle.ModelValue.yearMonthDayTimeDuration(value: datetime.datetime | str, value2: datetime.datetime | None = None) YearMonthDayTimeDuration ¶
- class arelle.ModelValue.YearMonthDayTimeDuration(years: int, months: int, days: int | None = None, hours: int | None = None, minutes: int | None = None, seconds: int | None = None)¶
Initialization
- __repr__() str ¶
- __str__() str ¶
- class arelle.ModelValue.Time¶
Bases:
datetime.time
- hour24: bool¶
None
- __new__(hour: int = 0, minute: int = 0, second: int = 0, microsecond: int = 0, tzinfo: datetime.tzinfo | None = None) arelle.ModelValue.Time ¶
- class arelle.ModelValue.gYearMonth(year: int | str, month: int | str)¶
Initialization
- __repr__() str ¶
- __str__() str ¶
- __eq__(other: Any) bool ¶
- __ne__(other: Any) bool ¶
- __lt__(other: Any) bool ¶
- __le__(other: Any) bool ¶
- __gt__(other: Any) bool ¶
- __ge__(other: Any) bool ¶
- __bool__() bool ¶
- __hash__() int ¶
- class arelle.ModelValue.gMonthDay(month: int | str, day: int | str)¶
Initialization
- __repr__() str ¶
- __str__() str ¶
- __eq__(other: Any) bool ¶
- __ne__(other: Any) bool ¶
- __lt__(other: Any) bool ¶
- __le__(other: Any) bool ¶
- __gt__(other: Any) bool ¶
- __ge__(other: Any) bool ¶
- __bool__() bool ¶
- __hash__() int ¶
- class arelle.ModelValue.gYear(year: int | str)¶
Initialization
- __repr__() str ¶
- __str__() str ¶
- __eq__(other: Any) bool ¶
- __ne__(other: Any) bool ¶
- __lt__(other: Any) bool ¶
- __le__(other: Any) bool ¶
- __gt__(other: Any) bool ¶
- __ge__(other: Any) bool ¶
- __bool__() bool ¶
- __hash__() int ¶
- class arelle.ModelValue.gMonth(month: int | str)¶
Initialization
- __repr__() str ¶
- __str__() str ¶
- __eq__(other: Any) bool ¶
- __ne__(other: Any) bool ¶
- __lt__(other: Any) bool ¶
- __le__(other: Any) bool ¶
- __gt__(other: Any) bool ¶
- __ge__(other: Any) bool ¶
- __bool__() bool ¶
- __hash__() int ¶
- class arelle.ModelValue.gDay(day: int | str)¶
Initialization
- __repr__() str ¶
- __str__() str ¶
- __eq__(other: Any) bool ¶
- __ne__(other: Any) bool ¶
- __lt__(other: Any) bool ¶
- __le__(other: Any) bool ¶
- __gt__(other: Any) bool ¶
- __ge__(other: Any) bool ¶
- __bool__() bool ¶
- __hash__() int ¶
- arelle.ModelValue.isoDurationPattern¶
‘compile(…)’
- arelle.ModelValue.isoDuration(value: str) IsoDuration ¶
(str) – Text of contained (inner) text nodes except for any whose localName starts with URI, for label and reference parts displaying purposes. (Footnotes, which return serialized html content of footnote.)
- arelle.ModelValue.DAYSPERMONTH¶
‘Decimal(…)’
XPath 2.0 does not define arithmetic operations on xs:duration for arithmetic one must use xs:yearMonthDuration or xs:dayTimeDuration instead
Arelle provides value comparisons for xs:duration even though they are not “totally ordered” per XPath 1.0 because these are necessary in order to define typed dimension ordering
- class arelle.ModelValue.IsoDuration(days: float = 0, seconds: float = 0, microseconds: float = 0, milliseconds: float = 0, minutes: float = 0, hours: float = 0, weeks: float = 0, months: decimal.Decimal = Decimal(0), years: decimal.Decimal = Decimal(0), negate: bool = False, sourceValue: str | None = None)¶
Bases:
isodate.Duration
.. class:: IsoDuration(modelDocument)
Implements custom class for xs:duration to work for typed dimensions Uses DAYSPERMONTH approximation of ordering days/months (only for typed dimensions, not XPath).
For formula purposes this object is not used because xpath 1.0 requires use of xs:yearMonthDuration or xs:dayTimeDuration which are totally ordered instead.
Initialization
- years: decimal.Decimal¶
None
- months: decimal.Decimal¶
None
- tdelta: datetime.timedelta¶
None
- __hash__() int ¶
- __eq__(other: Any) bool ¶
- __ne__(other: Any) bool ¶
- __lt__(other: Any) bool ¶
- __le__(other: Any) bool ¶
- __gt__(other: Any) bool ¶
- __ge__(other: Any) bool ¶
- viewText(labelrole: str | None = None, lang: str | None = None) str ¶
- __str__() str ¶
- class arelle.ModelValue.InvalidValue¶
Bases:
str
- __new__(value: str) arelle.ModelValue.InvalidValue ¶
- arelle.ModelValue.INVALIDixVALUE¶
‘InvalidValue(…)’
- arelle.ModelValue.TypeSValue¶
None
- arelle.ModelValue.TypeXValue¶
None