# @northguild/gmt/intermodal > Functions for container free time, demurrage and billing, plus parsers and formatters for EDIFACT, X12 and EPCIS date-times. Back to the [root llms.txt](https://northguild.dev/gmt/llms.txt). ## calculate - [billingTimeline](https://northguild.dev/gmt/reference/intermodal/calculate/billingTimeline.md): Lay out the deadline chain around a demurrage or detention invoice: the last date it may be issued, the last date it may be disputed, and the last date the dispute must be resolved. - [chargeableDays](https://northguild.dev/gmt/reference/intermodal/calculate/chargeableDays.md): Count the days a container is charged for between the start of its clock and its exit, and list the dates behind the count. - [demurrageClock](https://northguild.dev/gmt/reference/intermodal/calculate/demurrageClock.md): Pick the two events a charge's clock runs between. - [freeTimeExpiry](https://northguild.dev/gmt/reference/intermodal/calculate/freeTimeExpiry.md): Lay out a container's free time from the instant its clock started, and say when it ends. - [multimodalETA](https://northguild.dev/gmt/reference/intermodal/calculate/multimodalETA.md): Compute an end-to-end ETA across the legs of a multimodal move, and report the time in transit and the time in dwell separately. ## format - [bolTimestamp](https://northguild.dev/gmt/reference/intermodal/format/bolTimestamp.md): Render an instant as the date a bill of lading carries for an event: the calendar date on the local clock where the event happened. - [formatEdifactDate](https://northguild.dev/gmt/reference/intermodal/format/formatEdifactDate.md): Write an ISO 8601 date as a UN/EDIFACT `DTM` value (data element 2380) in a date format code (data element 2379). The inverse of `parseEdifactDate`: what one writes, the other reads back. - [formatEdifactDatePeriod](https://northguild.dev/gmt/reference/intermodal/format/formatEdifactDatePeriod.md): Write two ISO 8601 dates as a UN/EDIFACT `DTM` period (data element 2380) in a date period format code (data element 2379). The inverse of `parseEdifactDatePeriod`. - [formatEdifactDateTime](https://northguild.dev/gmt/reference/intermodal/format/formatEdifactDateTime.md): Write an ISO 8601 local date-time as a UN/EDIFACT `DTM` value (data element 2380) in a format code with no offset (data element 2379). The inverse of `parseEdifactDateTime`. - [formatEdifactDateTimePeriod](https://northguild.dev/gmt/reference/intermodal/format/formatEdifactDateTimePeriod.md): Write two ISO 8601 local date-times as a UN/EDIFACT `DTM` period (data element 2380) in a date-time period format code (data element 2379). The inverse of `parseEdifactDateTimePeriod`. - [formatEdifactOffsetDateTime](https://northguild.dev/gmt/reference/intermodal/format/formatEdifactOffsetDateTime.md): Write an ISO 8601 date-time with an offset as a UN/EDIFACT `DTM` value (data element 2380) in a format code that carries an offset (data element 2379). The inverse of `parseEdifactOffsetDateTime`. - [formatEdifactTime](https://northguild.dev/gmt/reference/intermodal/format/formatEdifactTime.md): Write an ISO 8601 time as a UN/EDIFACT `DTM` value (data element 2380) in a time format code (data element 2379). The inverse of `parseEdifactTime`. - [formatEpcisEvent](https://northguild.dev/gmt/reference/intermodal/format/formatEpcisEvent.md): Write an instant-plus-offset pair as the two required time fields of a GS1 EPCIS 2.0 event. - [formatX12Date](https://northguild.dev/gmt/reference/intermodal/format/formatX12Date.md): Write an ISO 8601 date as an X12 Date Time Period value (data element 1251) in a date format qualifier (data element 1250). The inverse of `parseX12Date`. - [formatX12DateRange](https://northguild.dev/gmt/reference/intermodal/format/formatX12DateRange.md): Write two ISO 8601 dates as an X12 Date Time Period range (data element 1251) in a date range format qualifier (data element 1250). The inverse of `parseX12DateRange`. - [formatX12DateTime](https://northguild.dev/gmt/reference/intermodal/format/formatX12DateTime.md): Write an ISO 8601 local date-time as an X12 Date Time Period value (data element 1251) in a date-time format qualifier (data element 1250). The inverse of `parseX12DateTime`. - [formatX12DateTimeRange](https://northguild.dev/gmt/reference/intermodal/format/formatX12DateTimeRange.md): Write two ISO 8601 local date-times as an X12 Date Time Period range (data element 1251) in a date-time range format qualifier (data element 1250). The inverse of `parseX12DateTimeRange`. - [formatX12Time](https://northguild.dev/gmt/reference/intermodal/format/formatX12Time.md): Write an ISO 8601 time as an X12 time in a time format qualifier (data element 1250). The result is also a data element 337 (Time) value: `parseX12Time` reads it back with the same qualifier, and with none. - [formatX12TimeElement](https://northguild.dev/gmt/reference/intermodal/format/formatX12TimeElement.md): Write an ISO 8601 time as an X12 data element 337 (Time) value, in the form the caller names by the element's own mask. `parseX12Time` reads the result back when it is given no qualifier. ## parse - [classifyEdifactDtmFormat](https://northguild.dev/gmt/reference/intermodal/parse/classifyEdifactDtmFormat.md): Name the kind of value a UN/EDIFACT data element 2379 format code states, and return the code narrowed to that kind, so a code that arrives as data reaches the function that reads it. - [classifyX12DateTimePeriodFormat](https://northguild.dev/gmt/reference/intermodal/parse/classifyX12DateTimePeriodFormat.md): Name the kind of value an X12 data element 1250 format qualifier states, and return the code narrowed to that kind, so a code that arrives as data reaches the function that reads it. - [classifyX12TimeCode](https://northguild.dev/gmt/reference/intermodal/parse/classifyX12TimeCode.md): Say whether an X12 time code (data element 623) states an offset or names a zone, and return the code narrowed to the function that reads it. - [parseEdifactDate](https://northguild.dev/gmt/reference/intermodal/parse/parseEdifactDate.md): Parse a UN/EDIFACT `DTM` value that states a calendar date, as an ISO 8601 date. - [parseEdifactDatePeriod](https://northguild.dev/gmt/reference/intermodal/parse/parseEdifactDatePeriod.md): Parse a UN/EDIFACT `DTM` value that states a period between two calendar dates, as its start and end. - [parseEdifactDateTime](https://northguild.dev/gmt/reference/intermodal/parse/parseEdifactDateTime.md): Parse a UN/EDIFACT `DTM` value that states a date and a time with no offset, as an ISO 8601 local date-time. - [parseEdifactDateTimePeriod](https://northguild.dev/gmt/reference/intermodal/parse/parseEdifactDateTimePeriod.md): Parse a UN/EDIFACT `DTM` value that states a period between two local date-times, as its start and end. - [parseEdifactOffsetDateTime](https://northguild.dev/gmt/reference/intermodal/parse/parseEdifactOffsetDateTime.md): Parse a UN/EDIFACT `DTM` value that states a date and a time with an offset from UTC, as an ISO 8601 date-time with its offset. - [parseEdifactTime](https://northguild.dev/gmt/reference/intermodal/parse/parseEdifactTime.md): Parse a UN/EDIFACT `DTM` value that states a time of day, as an ISO 8601 time. - [parseEpcisEvent](https://northguild.dev/gmt/reference/intermodal/parse/parseEpcisEvent.md): Read the two required time fields of a GS1 EPCIS 2.0 event as an instant, the UTC offset in force where the event happened, and the local wall clock there. - [parseX12Date](https://northguild.dev/gmt/reference/intermodal/parse/parseX12Date.md): Parse an X12 Date Time Period value that states a calendar date, as an ISO 8601 date. - [parseX12DateAndTime](https://northguild.dev/gmt/reference/intermodal/parse/parseX12DateAndTime.md): Read the date and the time of an X12 segment, sent as two elements, as one ISO 8601 local date-time. - [parseX12DateRange](https://northguild.dev/gmt/reference/intermodal/parse/parseX12DateRange.md): Parse an X12 Date Time Period value that states a range between two calendar dates, as its start and end. - [parseX12DateTime](https://northguild.dev/gmt/reference/intermodal/parse/parseX12DateTime.md): Parse an X12 Date Time Period value that states a date and a time, as an ISO 8601 local date-time. - [parseX12DateTimeRange](https://northguild.dev/gmt/reference/intermodal/parse/parseX12DateTimeRange.md): Parse an X12 Date Time Period value that states a range between two local date-times, as its start and end. - [parseX12Time](https://northguild.dev/gmt/reference/intermodal/parse/parseX12Time.md): Parse an X12 time as an ISO 8601 time: a data element 337 value with no qualifier, or a time that arrives with a data element 1250 format qualifier. - [x12TimeCodeOffset](https://northguild.dev/gmt/reference/intermodal/parse/x12TimeCodeOffset.md): Read the UTC offset an X12 time code (data element 623) states. - [x12TimeCodeZone](https://northguild.dev/gmt/reference/intermodal/parse/x12TimeCodeZone.md): Read the zone an X12 time code (data element 623) names. ## validate - [isValidEdifactDate](https://northguild.dev/gmt/reference/intermodal/validate/isValidEdifactDate.md): Return true when `value` is a UN/EDIFACT `DTM` value (data element 2380) that states a real calendar date in a date format code (data element 2379). - [isValidEdifactDatePeriod](https://northguild.dev/gmt/reference/intermodal/validate/isValidEdifactDatePeriod.md): Return true when `value` is a UN/EDIFACT `DTM` value (data element 2380) that states a period between two real calendar dates, in a date period format code (data element 2379). - [isValidEdifactDateTime](https://northguild.dev/gmt/reference/intermodal/validate/isValidEdifactDateTime.md): Return true when `value` is a UN/EDIFACT `DTM` value (data element 2380) that states a real date and time in a format code with no offset (data element 2379). - [isValidEdifactDateTimePeriod](https://northguild.dev/gmt/reference/intermodal/validate/isValidEdifactDateTimePeriod.md): Return true when `value` is a UN/EDIFACT `DTM` value (data element 2380) that states a period between two real local date-times, in a date-time period format code (data element 2379). - [isValidEdifactDtmFormat](https://northguild.dev/gmt/reference/intermodal/validate/isValidEdifactDtmFormat.md): Return true when `format` is a UN/EDIFACT data element 2379 format code that the EDIFACT functions read and write. - [isValidEdifactOffsetDateTime](https://northguild.dev/gmt/reference/intermodal/validate/isValidEdifactOffsetDateTime.md): Return true when `value` is a UN/EDIFACT `DTM` value (data element 2380) that states a real date and time with an offset from UTC, in a format code that carries one (data element 2379). - [isValidEdifactTime](https://northguild.dev/gmt/reference/intermodal/validate/isValidEdifactTime.md): Return true when `value` is a UN/EDIFACT `DTM` value (data element 2380) that states a real time of day in a time format code (data element 2379). - [isValidEpcisEvent](https://northguild.dev/gmt/reference/intermodal/validate/isValidEpcisEvent.md): Validate whether a value carries the two required time fields of a GS1 EPCIS 2.0 event, each in the grammar GS1 publishes for it. - [isValidEpcisEventTime](https://northguild.dev/gmt/reference/intermodal/validate/isValidEpcisEventTime.md): Return true when `value` is a real GS1 EPCIS 2.0 `eventTime`: the moment a supply-chain event happened, written as a date and time with `Z` or a UTC offset. - [isValidEpcisTimeZoneOffset](https://northguild.dev/gmt/reference/intermodal/validate/isValidEpcisTimeZoneOffset.md): Return true when `value` is a GS1 EPCIS 2.0 `eventTimeZoneOffset`: the UTC offset the local clock ran at where a supply-chain event happened, written `±HH:MM`. - [isValidX12Date](https://northguild.dev/gmt/reference/intermodal/validate/isValidX12Date.md): Return true when `value` is an X12 Date Time Period value (data element 1251) that states a real calendar date in a date format qualifier (data element 1250). - [isValidX12DateAndTime](https://northguild.dev/gmt/reference/intermodal/validate/isValidX12DateAndTime.md): Return true when the date and the time of an X12 segment, sent as two elements, together state a real local date and time. - [isValidX12DateRange](https://northguild.dev/gmt/reference/intermodal/validate/isValidX12DateRange.md): Return true when `value` is an X12 Date Time Period value (data element 1251) that states a range between two real calendar dates, in a date range format qualifier (data element 1250). - [isValidX12DateTime](https://northguild.dev/gmt/reference/intermodal/validate/isValidX12DateTime.md): Return true when `value` is an X12 Date Time Period value (data element 1251) that states a real date and time in a date-time format qualifier (data element 1250). - [isValidX12DateTimePeriodFormat](https://northguild.dev/gmt/reference/intermodal/validate/isValidX12DateTimePeriodFormat.md): Return true when `format` is an X12 data element 1250 (Date Time Period Format Qualifier) code that the X12 functions read and write. - [isValidX12DateTimeRange](https://northguild.dev/gmt/reference/intermodal/validate/isValidX12DateTimeRange.md): Return true when `value` is an X12 Date Time Period value (data element 1251) that states a range between two real local date-times, in a date-time range format qualifier (data element 1250). - [isValidX12Time](https://northguild.dev/gmt/reference/intermodal/validate/isValidX12Time.md): Return true when `value` is an X12 time that states a real time of day: a data element 337 value with no qualifier, or a time that fits the data element 1250 format qualifier it arrived with. - [isValidX12TimeCode](https://northguild.dev/gmt/reference/intermodal/validate/isValidX12TimeCode.md): Return true when `timeCode` is one of the 56 X12 data element 623 time codes, the codes `x12TimeCodeOffset` and `x12TimeCodeZone` read between them.