bkad / prat

group chat with markdown served over websockets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contextual time error with dates with day of the month difference of one but actually months apart

stevenguyenimpermium opened this issue · comments

See this line for the calculation of contextual date for yesterday. This doesn't handle the case where the dates are months apart. For example: Today is December 9, and the date of the chat is November 8. This line will trigger "yesterday".

Actually, same for the above line. That could also trigger unintentionally.

Wow that was sloppy, thanks for catching this.