0

GTFS feeds do not operate on the basis of a 24 hour day, for instance a trip that departs at 23:00 may arrive at 24:30 (more details).

LocalTime only supports 24 hour days - is there another construct that does support days with more than 24 hours? I was thinking about extending LocalDate to add support but I can see there are many inbuilt assumptions about there being a specific length of the day. It does not look easy to change those.

For reference I am using the JS port of threetenbp (js-joda).

Meno Hochschild
  • 42,708
  • 7
  • 104
  • 126
Linus Norton
  • 557
  • 1
  • 4
  • 15
  • I don't know how well the format support of js-joda is, but in principle: You should use lenient parsing because hour values of more than 24 are not supported at all in ThreetenBP (and hence should not be supported in js-joda which says that it is based on ThreetenBP). For formatting, you will need a manual workaround. – Meno Hochschild Dec 21 '17 at 12:43
  • What is your end goal, I handle this GTFS problem with Java on the server side. What are your inputs, I gather one is a time in the format HH:mm which could be 25:30 for example, is the other a javascript date object representing the current time ? And what is your desired output, is it simply a javascript date object ? – paulh Dec 21 '17 at 15:34
  • Ideally I'd like a LocalTime object. I'm using it's isBefore/isAfter methods – Linus Norton Dec 22 '17 at 06:47

0 Answers0