Add - but not implement - calculateLength()

Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
Fred Boniface 2023-08-04 00:31:55 +01:00
parent 4a1b8d12f8
commit 1c0081b570
1 changed files with 6 additions and 0 deletions

View File

@ -68,6 +68,7 @@ function transformTrainServices(input: any): TrainServices[] {
serviceIsSupressed: service?.serviceIsSupressed,
origin: transformLocation(service?.origin),
destination: transformLocation(service?.destination),
length: calculateLength(service),
isCancelled: service?.isCancelled,
cancelReason: service?.cancelReason,
delayReason: service?.delayReason,
@ -103,6 +104,11 @@ function transformLocation(input: any): ServiceLocation[] {
return output
}
function calculateLength(input: TrainServices): number | undefined {
console.log(input);
return undefined
}
function transformUnspecifiedDateTime(input: string): Date | undefined {
console.debug(`staffStation.transformUnspecifiedDateTime running`)
if (!input) {