philomena-dev / philomena

Next-generation imageboard
GNU Affero General Public License v3.0
84 stars 29 forks source link

timeago: migrate to TypeScript #226

Closed liamwhite closed 2 months ago

liamwhite commented 2 months ago

This moves all of the pretty timestamp conversion logic into TypeScript. There should be no effective changes to the logic here. Two uses of timeAgo outside the file were converted to import the function directly instead of using the version on window.booru - the version attached to window.booru is preserved for userscript compatibility only.

This has 100% test coverage in unit tests and has also been manually integration tested.