HHMM.prototype.gt(other: string | number): boolean
gt = greater than
Checks whether this
represents a time later than the input time
It's recommended to use the HM symbol property, but there are multiple ways to do the comparison.
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].gt(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).gt(time2))