arelle.ModelValue

See COPYRIGHT.md for copyright information.

Module Contents

Classes

Functions

qname

qnameHref

qnameNsLocalName

qnameClarkName

qnameEltPfxName

qnameFromNsmap

anyURI

tzinfo

tzinfoStr

dateTime

lastDayOfMonth

dateUnionEqual

dateunionDate

yearMonthDuration

dayTimeDuration

yearMonthDayTimeDuration

time

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.)

Data

datetimePattern

timePattern

durationPattern

DATE

DATETIME

DATEUNION

isoDurationPattern

DAYSPERMONTH

XPath 2.0 does not define arithmetic operations on xs:duration for arithmetic one must use xs:yearMonthDuration or xs:dayTimeDuration instead

INVALIDixVALUE

TypeSValue

TypeXValue

API

arelle.ModelValue.qname(value: arelle.ModelObject.ModelObject | str | QName | Any | None, name: str | QName | arelle.ModelObject.ModelObject | dict[str, str] | dict[str | None, str] | None = None, noPrefixIsNoNamespace: bool = False, castException: Exception | type[Exception] | None = None, prefixException: Exception | type[Exception] | None = None) QName | None
arelle.ModelValue.qnameHref(href: str) QName
arelle.ModelValue.qnameNsLocalName(namespaceURI: str | None, localName: str) QName
arelle.ModelValue.qnameClarkName(clarkname: str) QName
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: Exception | type[Exception] | None = None) QName | None
arelle.ModelValue.qnameFromNsmap(nsmap: collections.abc.Mapping[str | None, str], prefixedName: str, prefixException: Exception | type[Exception] | None = None) QName | None
class arelle.ModelValue.QName(prefix: str | None, namespaceURI: str | None, localName: str)

Initialization

property clarkNotation: str
property expandedName: str
arelle.ModelValue.anyURI(value: str, castException: Exception | None = None) AnyURI | None
class arelle.ModelValue.AnyURI

Bases: str

capitalize()
casefold()
center()
count()
encode()
endswith()
expandtabs()
find()
format()
format_map()
index()
isalnum()
isalpha()
isascii()
isdecimal()
isdigit()
isidentifier()
islower()
isnumeric()
isprintable()
isspace()
istitle()
isupper()
join()
ljust()
lower()
lstrip()
partition()
removeprefix()
removesuffix()
replace()
rfind()
rindex()
rjust()
rpartition()
rsplit()
rstrip()
split()
splitlines()
startswith()
strip()
swapcase()
title()
translate()
upper()
zfill()
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 | datetime.date) 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

addYearMonthDuration(other: arelle.ModelValue.YearMonthDuration, sign: int) arelle.ModelValue.DateTime
property hour
property minute
property second
property microsecond
property tzinfo
property fold
classmethod fromtimestamp(timestamp, tz=None)
classmethod utcfromtimestamp(t)
classmethod now(tz=None)
classmethod utcnow()
classmethod combine(date, time, tzinfo=True)
classmethod fromisoformat(date_string)
timetuple()
timestamp()
utctimetuple()
date()
time()
timetz()
replace(year=None, month=None, day=None, hour=None, minute=None, second=None, microsecond=None, tzinfo=True, *, fold=None)
astimezone(tz=None)
ctime()
isoformat(sep='T', timespec='auto')
classmethod strptime(date_string, format)
utcoffset()
tzname()
dst()
classmethod today()
classmethod fromordinal(n)
classmethod fromisocalendar(year, week, day)
strftime(format)
property year
property month
property day
toordinal()
weekday()
isoweekday()
isocalendar()
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

arelle.ModelValue.dayTimeDuration(value: Time | datetime.timedelta | str) DayTimeDuration
class arelle.ModelValue.DayTimeDuration

Bases: datetime.timedelta

dayHrsMinsSecs() tuple[int, int, int, int]
total_seconds()
property days
property seconds
property microseconds
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

arelle.ModelValue.time(value: str | arelle.ModelObject.ModelObject | datetime.time | datetime.datetime | Any | None, castException: type[Exception] | None = None) Time | None
class arelle.ModelValue.Time

Bases: datetime.time

hour24: bool

None

classmethod strptime(date_string, format)
property hour
property minute
property second
property microsecond
property tzinfo
property fold
isoformat(timespec='auto')
classmethod fromisoformat(time_string)
strftime(format)
utcoffset()
tzname()
dst()
replace(hour=None, minute=None, second=None, microsecond=None, tzinfo=True, *, fold=None)
class arelle.ModelValue.gYearMonth(year: int | str, month: int | str)

Initialization

class arelle.ModelValue.gMonthDay(month: int | str, day: int | str)

Initialization

class arelle.ModelValue.gYear(year: int | str)

Initialization

class arelle.ModelValue.gMonth(month: int | str)

Initialization

class arelle.ModelValue.gDay(day: int | str)

Initialization

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

viewText(labelrole: str | None = None, lang: str | None = None) str
class arelle.ModelValue.InvalidValue

Bases: str

capitalize()
casefold()
center()
count()
encode()
endswith()
expandtabs()
find()
format()
format_map()
index()
isalnum()
isalpha()
isascii()
isdecimal()
isdigit()
isidentifier()
islower()
isnumeric()
isprintable()
isspace()
istitle()
isupper()
join()
ljust()
lower()
lstrip()
partition()
removeprefix()
removesuffix()
replace()
rfind()
rindex()
rjust()
rpartition()
rsplit()
rstrip()
split()
splitlines()
startswith()
strip()
swapcase()
title()
translate()
upper()
zfill()
arelle.ModelValue.INVALIDixVALUE

‘InvalidValue(…)’

arelle.ModelValue.TypeSValue

None

arelle.ModelValue.TypeXValue

None