Skip to main content

Timeline for How to compare date strings?

Current License: CC BY-SA 4.0

6 events
when toggle format what by license comment
Apr 17, 2021 at 15:42 comment added kfoley You're correct, I was using time-less-p with the result of parse-time-string instead of date-to-time
Apr 16, 2021 at 22:25 history edited Drew CC BY-SA 4.0
added 213 characters in body
Apr 16, 2021 at 22:23 comment added Drew @kfoley: I don't see that. (time-less-p (date-to-time "2021-04-15 13:00:00") (date-to-time "2021-04-16 12:00:00")) returns t, and in the opposite order returns nil.
Apr 16, 2021 at 19:46 comment added kfoley I may be misunderstanding something but it looks like time-less-p only compares the time elements of datetime's. So comparing 2021-04-16 12:00:00 and 2021-04-15 13:00:00 would indicate the latter is greater, because 13 > 12, ignoring the fact that it's a day before.
Apr 15, 2021 at 7:18 vote accept Onner Irotsab
Apr 14, 2021 at 16:32 history answered Drew CC BY-SA 4.0