HHMM.prototype.lt(other: string | number): boolean
lt = less than
Checks whether this
represents a time earlier than the input time
It's recommended to use the HM symbol property, but there are multiple ways to compare less than.
const time1 = "08:00" const time2 = "09:00" // ✅ Most ergonomic and readable if (time1[HM] < time2[HM]) // 🟧 Not a bad solution either, but at-a-glance readability suffers if (time1[HM].lt(time2)) // 🟧 Works, but there's 6 more characters to read and write for each `new HHMM()` compared // to using the HM symbol property. Multiply that with the number of times // you are doing any comparison, add/subtract etc. if (new HHMM(time1) < new HHMM(time2)) // 🟥 Worst of both worlds if (new HHMM(time1).lt(time2))