Skip to content

Commit

Permalink
Merge pull request #942 from mesur-io/feat/cleanup-datetime
Browse files Browse the repository at this point in the history
Clean up date and datetime usage
  • Loading branch information
mkhraisha authored Apr 2, 2024
2 parents 219cb3a + a1be2a2 commit ac281d4
Show file tree
Hide file tree
Showing 38 changed files with 101 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ properties:
type: string
$linkedData:
term: activityDate
'@id': https://schema.org/DateTime
'@id': https://schema.org/endDate
'@type': http://www.w3.org/2001/XMLSchema#date
activityType:
title: Activity Type
description: Type of Activity, e.g., plant, harvest, spray.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,15 @@ properties:
$linkedData:
term: inspectionStarted
'@id': https://schema.org/startDate
'@type': http://www.w3.org/2001/XMLSchema#dateTime
inspectionEnded:
title: Inspection Ended
description: Date and time inspection ended in ISO 8601 format (e.g. 1970-01-01T00:00Z for UTC, or 1970:01:01T00:00-5:00 for New York on standard time).
type: string
$linkedData:
term: inspectionEnded
'@id': https://schema.org/endDate
'@type': http://www.w3.org/2001/XMLSchema#dateTime
additionalProperties: false
required:
- type
Expand Down
9 changes: 6 additions & 3 deletions docs/openapi/components/schemas/common/AgriculturePackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,26 @@ properties:
type: string
$linkedData:
term: packingDate
'@id': https://schema.org/DateTime
'@id': https://schema.org/endDate
'@type': http://www.w3.org/2001/XMLSchema#date
harvestDate:
title: Harvest Date
description: >-
Human readable date describing the date the package was harvested.
type: string
$linkedData:
term: harvestDate
'@id': https://schema.org/DateTime
'@id': https://schema.org/endDate
'@type': http://www.w3.org/2001/XMLSchema#date
bestByDate:
title: Best By Date
description: >-
Human readable date describing the date the package is 'best by'.
type: string
$linkedData:
term: bestByDate
'@id': https://schema.org/DateTime
'@id': https://schema.org/endDate
'@type': http://www.w3.org/2001/XMLSchema#date
labelImageUrl:
title: Label Image URL
description: Image of the package label
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ properties:
$linkedData:
term: expectedArrival
'@id': https://schema.org/expectedArrivalFrom
'@type': http://www.w3.org/2001/XMLSchema#date
specialInstructions:
title: Special Instructions
description: Instructions for freight handlers
Expand Down
3 changes: 2 additions & 1 deletion docs/openapi/components/schemas/common/CBPEntry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ properties:
$linkedData:
term: arrivalDate
'@id': https://vocabulary.uncefact.org/actualArrivalRelatedDateTime
'@type': http://www.w3.org/2001/XMLSchema#date
additionalProperties: false
required:
- type
Expand Down Expand Up @@ -372,4 +373,4 @@ example: |-
"voyageFlightTrip": "E002901",
"conveyanceName": "Gizera",
"arrivalDate": "2022-02-25"
}
}
3 changes: 2 additions & 1 deletion docs/openapi/components/schemas/common/CBPEntryLineItem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ properties:
type: string
$linkedData:
term: freeTradeZoneFilingDate
'@id': https://schema.org/Date
'@id': https://schema.org/endDate
'@type': http://www.w3.org/2001/XMLSchema#date
freeTradeZoneStatus:
title: Free Trade Zone Status
description: For Entry type 06, select P for Privileged Foreign or N for Non-privileged Foreign. For all other entry types leave blank
Expand Down
17 changes: 11 additions & 6 deletions docs/openapi/components/schemas/common/CBPEntrySummary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ properties:
type: string
$linkedData:
term: summaryDate
'@id': https://schema.org/Date
'@id': https://schema.org/endDate
'@type': http://www.w3.org/2001/XMLSchema#date
suretyCode:
title: Surety Code
description: Provide the surety code. The surety code identifies the surety company, authorized by the Department of the Treasury.
Expand Down Expand Up @@ -86,7 +87,8 @@ properties:
type: string
$linkedData:
term: entryDate
'@id': https://schema.org/Date
'@id': https://schema.org/endDate
'@type': http://www.w3.org/2001/XMLSchema#date
importingCarrier:
title: Importing Carrier
description: For merchandise arriving in the U.S. by vessel, record the name of the vessel that transported the merchandise from the foreign port of lading to the first U.S. port of unlading. Do not record the vessel identifier code in lieu of the vessel name. Pursuant to General Statistical Note 1 (a) (ii) of the HTS, the reporting of the vessel flag is not required. For merchandise arriving in the U.S. by air, record the two digit IATA alpha code corresponding to the name of the airline which transported the merchandise from the last airport of foreign lading to the first U.S. airport of unlading. If the carrier file does not contain a specific air carrier's code, write the designation "*C" for Canadian airlines, "*F" for other foreign airlines, and "*U" for U.S. airlines. These designations should be used only for unknown charter and private aircraft. When a private aircraft is being entered under its own power (ferried), the designation "**" will be used. For merchandise arriving in the U.S. by means of transportation other than vessel or air, leave blank. Do not record the name of a domestic carrier transporting merchandise after initial lading in the U.S. For merchandise arriving in the customs territory from a U.S. Foreign Trade Zone (FTZ), insert "FTZ" followed by the FTZ number. Use the following format FTZ NNNN.
Expand Down Expand Up @@ -115,7 +117,8 @@ properties:
type: string
$linkedData:
term: importDate
'@id': https://schema.org/Date
'@id': https://schema.org/endDate
'@type': http://www.w3.org/2001/XMLSchema#date
billOfLadingNumber:
title: Bill of Lading Number
description: Bill of Lading or Waybill number.
Expand Down Expand Up @@ -144,7 +147,8 @@ properties:
type: string
$linkedData:
term: exportDate
'@id': https://schema.org/Date
'@id': https://schema.org/endDate
'@type': http://www.w3.org/2001/XMLSchema#date
immediateTransportationNumber:
title: Immediate Transportation Number
description: Record the IT number obtained from the CBP Form 7512, AWB number from the Transit Air Cargo Manifest (TACM), or Automated Manifest System (AMS) master in-bond (MIB) movement number.
Expand All @@ -158,7 +162,8 @@ properties:
type: string
$linkedData:
term: immediateTransportationDate
'@id': https://schema.org/Date
'@id': https://schema.org/endDate
'@type': http://www.w3.org/2001/XMLSchema#date
missingDocuments:
title: Missing Documents
description: Record the appropriate document code number(s) to indicate documents not available at the time of filing the entry summary. A maximum of two codes may be used. The bond charge should be made on the entry summary only for those documents required to be filed with the entry summary.
Expand Down Expand Up @@ -429,4 +434,4 @@ example: |-
"price": 8532,
"priceCurrency": "USD"
}
}
}
5 changes: 3 additions & 2 deletions docs/openapi/components/schemas/common/CTPAT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@ properties:
type: string
$linkedData:
term: dateOfLastValidation
'@id': https://schema.org/Date
'@id': https://schema.org/endDate
'@type': http://www.w3.org/2001/XMLSchema#date
issuingCountry:
title: Issuing Country
description: >-
Expand Down Expand Up @@ -355,4 +356,4 @@ example: |-
"tier": "Certified",
"dateOfLastValidation": "2022-01-06T11:50:00Z",
"issuingCountry": "US"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ properties:
term: issueDate
'@id': >-
https://vocabulary.uncefact.org/issueDateTime
'@type': http://www.w3.org/2001/XMLSchema#date
shippedOnBoardDate:
title: Shipped On Board Date
description: >-
Expand All @@ -59,6 +60,7 @@ properties:
term: shippedOnBoardDate
'@id': >-
https://api.swaggerhub.com/domains/dcsaorg/DCSA_DOMAIN/1.0.2#/components/schemas/shippedOnBoardDate
'@type': http://www.w3.org/2001/XMLSchema#date
receivedForShipmentDate:
title: Received For Shipment Date
description: >-
Expand All @@ -70,6 +72,7 @@ properties:
term: receivedForShipmentDate
'@id': >-
https://vocabulary.uncefact.org/availabilityDueDateTime
'@type': http://www.w3.org/2001/XMLSchema#date
termsAndConditions:
title: Terms And Conditions
description: Carrier general terms and conditions for this transport document.
Expand Down
5 changes: 5 additions & 0 deletions docs/openapi/components/schemas/common/DeliverySchedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ properties:
$linkedData:
term: scheduledDate
'@id': https://schema.org/departureTime
'@type': http://www.w3.org/2001/XMLSchema#date
injectionVolume:
title: Injection Volume
description: Volume of the shipped commodities at the begining of the transportation event
Expand All @@ -97,27 +98,31 @@ properties:
$linkedData:
term: injectionDate
'@id': https://schema.org/departureTime
'@type': http://www.w3.org/2001/XMLSchema#dateTime
injectionEndDate:
title: Injection End Date
description: The planned time for crude oil injection to end
type: string
$linkedData:
term: injectionEndDate
'@id': https://schema.org/departureTime
'@type': http://www.w3.org/2001/XMLSchema#dateTime
deliveryStartDate:
title: Delivery Start Date
description: The planned time for crude oil delivery to start
type: string
$linkedData:
term: deliveryDate
'@id': https://schema.org/arrivalTime
'@type': http://www.w3.org/2001/XMLSchema#dateTime
deliveryEndDate:
title: Delivery End Date
description: The planned time for crude oil delivery to end
type: string
$linkedData:
term: deliveryEndDate
'@id': https://schema.org/arrivalTime
'@type': http://www.w3.org/2001/XMLSchema#dateTime
portOfEntry:
title: Port of Entry
description: The port where the commodity crosses the border.
Expand Down
3 changes: 2 additions & 1 deletion docs/openapi/components/schemas/common/DeliveryStatement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ properties:
type: string
$linkedData:
term: deliveredDate
'@id': https://schema.org/Date
'@id': https://schema.org/endDate
'@type': http://www.w3.org/2001/XMLSchema#dateTime
deliveredVolume:
title: deliveredVolume
description: Volume of the item being delivered
Expand Down
4 changes: 4 additions & 0 deletions docs/openapi/components/schemas/common/EDDShape.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,23 @@ properties:
$linkedData:
term: observationDate
'@id': http://rs.tdwg.org/dwc/terms/eventDate
'@type': http://www.w3.org/2001/XMLSchema#date
dateEntered:
title: Date Entered
description: Date record is entered into the database.
type: string
$linkedData:
term: dateEntered
'@id': http://rs.tdwg.org/dwc/terms/eventDate
'@type': http://www.w3.org/2001/XMLSchema#date
dateUpdated:
title: Date Updated
description: Date record information was updated.
type: string
$linkedData:
term: dateUpdated
'@id': http://rs.tdwg.org/dwc/terms/eventDate
'@type': http://www.w3.org/2001/XMLSchema#date
location:
title: Location
description: County, State, and Country in which the subject was recorded.
Expand Down Expand Up @@ -256,6 +259,7 @@ properties:
$linkedData:
term: uuid
'@id': http://rs.tdwg.org/dwc/terms/dateIdentified
'@type': http://www.w3.org/2001/XMLSchema#date
reviewer:
title: Reviewer
description: Name of Reviewer.
Expand Down
3 changes: 2 additions & 1 deletion docs/openapi/components/schemas/common/Event.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ properties:
type: string
$linkedData:
term: eventTime
'@id': https://schema.org/DateTime
'@id': https://schema.org/endTime
'@type': http://www.w3.org/2001/XMLSchema#time
products:
title: Products
description: The products referenced by the event in hashlinks.
Expand Down
1 change: 1 addition & 0 deletions docs/openapi/components/schemas/common/FSMACreatingCTE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ properties:
$linkedData:
term: dateCompleted
'@id': https://schema.org/endDate
'@type': http://www.w3.org/2001/XMLSchema#dateTime
additionalData:
title: Additional Data
description: Additional Key Data Elements (KDEs).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ properties:
$linkedData:
term: coolingDate
'@id': https://schema.org/endDate
'@type': http://www.w3.org/2001/XMLSchema#dateTime
packingLocation:
title: Packing Location
description: Where the food was packed.
Expand All @@ -69,6 +70,7 @@ properties:
$linkedData:
term: packingDate
'@id': https://schema.org/endDate
'@type': http://www.w3.org/2001/XMLSchema#dateTime
additionalData:
title: Additional Data
description: Additional Key Data Elements (KDEs).
Expand Down Expand Up @@ -134,4 +136,4 @@ example: |-
"harvestDate": "2022-01-03T00:00Z",
"coolingDate": "2022-01-07T00:00Z",
"packingDate": "2022-02-03T00:00Z"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ properties:
$linkedData:
term: dateReceived
'@id': https://schema.org/endDate
'@type': http://www.w3.org/2001/XMLSchema#dateTime
additionalData:
title: Additional Data
description: Additional Key Data Elements (KDEs).
Expand Down
1 change: 1 addition & 0 deletions docs/openapi/components/schemas/common/FSMAShippingCTE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ properties:
$linkedData:
term: dateShipped
'@id': https://schema.org/startDate
'@type': http://www.w3.org/2001/XMLSchema#dateTime
additionalData:
title: Additional Data
description: Additional Key Data Elements (KDEs).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ properties:
$linkedData:
term: dateCompleted
'@id': https://schema.org/endDate
'@type': http://www.w3.org/2001/XMLSchema#dateTime
additionalData:
title: Additional Data
description: Additional Key Data Elements (KDEs).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ properties:
$linkedData:
term: proposedCorrectionDate
'@id': https://vocabulary.uncefact.org/occurrenceDateTime
'@type': http://www.w3.org/2001/XMLSchema#date
dateCorrected:
title: Date Corrected
description: The actual date corrected.
type: string
$linkedData:
term: dateCorrected
'@id': https://vocabulary.uncefact.org/occurrenceDateTime
'@type': http://www.w3.org/2001/XMLSchema#date
additionalProperties: false
required:
- type
Expand Down
1 change: 1 addition & 0 deletions docs/openapi/components/schemas/common/GAPInspection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ properties:
$linkedData:
term: dateReviewed
'@id': https://www.gs1.org/voc/certificationAuditDate
'@type': http://www.w3.org/2001/XMLSchema#date
meetsCriteria:
title: Meets Criteria
description: Audit Results meets USDA Acceptance Criteria
Expand Down
4 changes: 2 additions & 2 deletions docs/openapi/components/schemas/common/IATAAirWaybill.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ properties:
$linkedData:
term: requestedDate
'@id': https://w3id.org/traceability#requestDate
'@type': http://www.w3.org/2001/XMLSchema#dateTime
'@type': http://www.w3.org/2001/XMLSchema#date
accountingInformation:
title: Accounting Information
description: >-
Expand Down Expand Up @@ -637,4 +637,4 @@ example: |-
"type": ["Place"],
"iataAirportCode": "XMN"
}
}
}
3 changes: 2 additions & 1 deletion docs/openapi/components/schemas/common/Inbond.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ properties:
type: string
$linkedData:
term: expectedDeliveryDate
'@id': https://schema.org/DateTime
'@id': https://schema.org/endDate
'@type': http://www.w3.org/2001/XMLSchema#date
valuePerItem:
title: Value Per Item
description: Total Value Per Item
Expand Down
3 changes: 2 additions & 1 deletion docs/openapi/components/schemas/common/IntentToImport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ properties:
$linkedData:
term: declarationDate
'@id': https://schema.org/startDate
'@type': http://www.w3.org/2001/XMLSchema#date
additionalProperties: false
required:
- type
Expand Down Expand Up @@ -127,4 +128,4 @@ example: |-
}
},
"declarationDate": "2022-03-21"
}
}
Loading

0 comments on commit ac281d4

Please sign in to comment.