Edge cases where the distance is a bit below the zone threshold aren't correct.
For example, CDG-DXB returns 3256mi and XP for Long 1 (2000 to 3500mi) type flight.
However FB simulator
https://www.flyingblue.us/en/programme/more-info/status considers this a Long 2 (3500 to 5000mi) type and FB indeed awards Long 2 XP amount (10XP on Y).
I think FB uses different thresholds from the published ones and/or different distance formula.
Overall a great tool anyhow.