File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ module ShipmentHandler =
2929 let private checkShipmentDate ( timestamp : string ) : bool =
3030 ( timestamp |> System.DateTime.Parse |> System.DateTime.Now.Subtract |> _. Days) > DaysAfterDelivery
3131
32+ let private dateTimeStringToTimeOnly ( dateTime : string ) =
33+ dateTime |> System.DateTime.Parse |> System.TimeOnly.FromDateTime
34+
3235 let printShipmentLine ( idx : int ) ( number : string ) ( shipment : DhlSchema.supermodelIoLogisticsTrackingShipment ) =
3336 if
3437 shipment.Status.Timestamp.ToString() |> checkShipmentDate
@@ -50,7 +53,7 @@ module ShipmentHandler =
5053 let timeFrame =
5154 match shipment.EstimatedDeliveryTimeFrame with
5255 | null -> " "
53- | tf -> $" / {System.DateTime.Parse( tf.ToString())} "
56+ | tf -> $" ({tf.EstimatedFrom.ToString() |> dateTimeStringToTimeOnly}-{ tf.EstimatedThrough. ToString() |> dateTimeStringToTimeOnly}) "
5457
5558 let deliveryRemark =
5659 match shipment.EstimatedTimeOfDeliveryRemark with
You can’t perform that action at this time.
0 commit comments