OurTechCommunity / catchup

The OTC CatchUp web app and workflows.
https://catchup.ourtech.community
MIT License
15 stars 9 forks source link

Error in superscript ordinals #128

Closed AadityaNitin closed 1 year ago

AadityaNitin commented 1 year ago

The superscript ordinals in the numbers ending with 11 should be "th" instead of "st"

image

tusharnankani commented 1 year ago

Thanks for opening the issue, Aaditya!

We need to modify this: https://github.com/OurTechCommunity/catchup/blob/750d1d23e506e0627647c3d9b5170ef4f5ec629c/util/catchup-number.js#L19-L26

Easy fix: the error will only (hopefully) come for x11. Should be th instead of st.

Do you want to take this up and create a PR, @AadityaNitin?

HarshKapadia2 commented 1 year ago

Easy fix: the error will only (hopefully) come for x11. Should be th instead of st.

Numbers x11, x12 and x13 are all affected. They all should end with th rather than st, nd and rd respectively.

Eg: The current behaviour for OTC CatchUp no. 313 is to output 313rd, but it should be 313th.

tusharnankani commented 1 year ago

Oh yes, I had a feeling I was missing something.

The error will only (hopefully) come for x11. Should be th instead of st.

So, now we just check if the second last number is 1. Should be fairly simple.

HarshKapadia2 commented 1 year ago

Thank you so much for opening a PR, Tushar!