Esempio n. 1
0
def dateTimeInstantEnd(xc, p, source):
    if isinstance(source, datetime.datetime):
        return source  # true for either datetime.date or datetime.datetime
    return ModelValue.dateTime(source,
                               addOneDay=True,
                               type=ModelValue.DATETIME,
                               castException=FORG0001)
Esempio n. 2
0
def date(xc, p, source):
    return ModelValue.dateTime(source,
                               type=ModelValue.DATE,
                               castException=FORG0001)
Esempio n. 3
0
def xbrliDateUnion(xc, p, source):
    if isinstance(source, datetime.date):
        return source  # true for either datetime.date or datetime.datetime
    return ModelValue.dateTime(source,
                               type=ModelValue.DATEUNION,
                               castException=FORG0001)
Esempio n. 4
0
def dateTime(xc, p, source):
    if isinstance(source, datetime.datetime): return source
    return ModelValue.dateTime(source,
                               type=ModelValue.DATETIME,
                               castException=FORG0001)
Esempio n. 5
0
def date(xc, p, source):
    return ModelValue.dateTime(source, type=ModelValue.DATE, castException=FORG0001)
Esempio n. 6
0
def xbrliDateUnion(xc, p, source):
    if isinstance(source,datetime.date): return source  # true for either datetime.date or datetime.datetime
    return ModelValue.dateTime(source, type=ModelValue.DATEUNION, castException=FORG0001)
Esempio n. 7
0
def dateTimeInstantEnd(xc, p, source):
    if isinstance(source,datetime.datetime): return source  # true for either datetime.date or datetime.datetime
    return ModelValue.dateTime(source, addOneDay=True, type=ModelValue.DATETIME, castException=FORG0001)
Esempio n. 8
0
def dateTime(xc, p, source):
    if isinstance(source,datetime.datetime): return source
    return ModelValue.dateTime(source, type=ModelValue.DATETIME, castException=FORG0001)