ifcopenshell.util.date
¶
Module Contents¶
- ifcopenshell.util.date.canonicalise_time(time: datetime.datetime | None) str ¶
- ifcopenshell.util.date.datetime2ifc(dt: None, ifc_type: Any) None ¶
- ifcopenshell.util.date.datetime2ifc(dt: datetime.date | str | None, ifc_type: Literal['IfcDuration', 'IfcTimeStamp', 'IfcDateTime', 'IfcDate', 'IfcTime', 'IfcCalendarDate', 'IfcLocalTime']) int | str | dict[str, Any] | None
- ifcopenshell.util.date.ifc2datetime(element: str | int | ifcopenshell.entity_instance)¶
- ifcopenshell.util.date.parse_duration(value: str | None) datetime.timedelta | None ¶
- ifcopenshell.util.date.readable_ifc_duration(duration: str) str ¶
Convert ISO duration to more readable string format.
Examples: - “P2Y3M1W4DT5H45M30S” -> “2 Y 3 M 1 W 4 D 5 h 45 m 30 s” - “P2Y3MT30S” -> “2 Y 3 M 30 s” - “PT2500H” -> “2500 h” (hours are not converted to days)
- ifcopenshell.util.date.string_to_date(string)¶
- ifcopenshell.util.date.string_to_duration(duration_string)¶
- ifcopenshell.util.date.timedelta2duration(timedelta)¶