mt_metadata.common.time_period ============================== .. py:module:: mt_metadata.common.time_period Classes ------- .. autoapisummary:: mt_metadata.common.time_period.TimePeriod mt_metadata.common.time_period.TimePeriodDate Module Contents --------------- .. py:class:: TimePeriod(**data) Bases: :py:obj:`mt_metadata.base.MetadataBase` Time span of a period of time. .. py:attribute:: end :type: Annotated[str | float | int | numpy.datetime64 | pandas.Timestamp | mt_metadata.common.mttime.MTime, Field(default_factory=lambda: MTime(time_stamp='1980-01-01T00:00:00+00:00'), description='End date and time of collection in UTC.', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': '2020-02-04T16:23:45.453670+00:00', 'type': 'string'})] .. py:attribute:: start :type: Annotated[str | float | int | numpy.datetime64 | pandas.Timestamp | mt_metadata.common.mttime.MTime, Field(default_factory=lambda: MTime(), description='Start date and time of collection in UTC.', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': '2020-02-01T09:23:45.453670+00:00', 'type': 'string'})] .. py:method:: validate_time(value, info) :classmethod: Validate that the value is a valid time. .. py:method:: start_is_default() Check if the start time is the default time. .. py:method:: end_is_default() Check if the end time is the default time. .. py:class:: TimePeriodDate(**data) Bases: :py:obj:`mt_metadata.base.MetadataBase` Time span of a period of time. .. py:attribute:: end_date :type: Annotated[str | float | int | numpy.datetime64 | pandas.Timestamp | mt_metadata.common.mttime.MTime | mt_metadata.common.mttime.MDate, Field(default_factory=lambda: MDate(time_stamp='1980-01-01'), description='End date and time of collection in UTC.', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': '2020-02-04', 'type': 'string'})] .. py:attribute:: start_date :type: Annotated[str | float | int | numpy.datetime64 | pandas.Timestamp | mt_metadata.common.mttime.MTime | mt_metadata.common.mttime.MDate, Field(default_factory=lambda: MDate(time_stamp='1980-01-01'), description='Start date and time of collection in UTC.', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': '2020-02-01', 'type': 'string'})] .. py:method:: validate_time(value, info) :classmethod: Validate that the value is a valid time. .. py:method:: start_is_default() Check if the start time is the default time. .. py:method:: end_is_default() Check if the end time is the default time.