Dear Southwest Airlines,
I’m not entirely sure you’re using the phrase “on time” the way the rest of us are. Let’s review how you reported on Fight 1215’s status tonight:
You’re acknowledging that when a flight leaves three hours later than scheduled it’s “Delayed”. But in what system of timekeeping did you conclude that a 12:30 am arrival for a 9:20 schedule is “On Time”?
I’ll tell you what happened. Your developer forgot about dates when writing code that probably looks something like this:
if (scheduledArrivalTime < publishedArrivalTime) { return "On Time"; }
See, even though 12:30 am is earlier in the day than 9:30 pm, the flight is still unquestionably delayed.
We’re just hoping the same person didn’t write the software that helps land the planes.
Sincerely,
Someone who will be leaving for the airport long after this plane should have been here
I am sadly familiar with the issues in date+time comparisons, especially calculating elapsed times. MS .NET (and Java and PHP, no doubt) have mature libraries to do time arithmetic — subtract date/times, etc. The stumbling block for me was wanting to know elapsed work time — so 4:59pm Friday is 2 minutes difference from 8:01 the following Monday. Also holidays don’t count.
TimeSpan ts = end – start; didn’t cut it. So it took about 1000 lines of code. Airplane on time? Piece of cake.