Giter Site home page Giter Site logo

Comments (4)

tusharnankani avatar tusharnankani commented on September 26, 2024 1

Thanks for opening the issue, Aaditya!

We need to modify this:

function getSuffix(catchUpNumber) {
const lastChar = catchUpNumber.slice(-1);
if (lastChar === "1") return "st";
else if (lastChar === "2") return "nd";
else if (lastChar === "3") return "rd";
else return "th";
}

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?

from catchup.

HarshKapadia2 avatar HarshKapadia2 commented on September 26, 2024 1

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.

from catchup.

HarshKapadia2 avatar HarshKapadia2 commented on September 26, 2024 1

Thank you so much for opening a PR, Tushar!

from catchup.

tusharnankani avatar tusharnankani commented on September 26, 2024

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.

from catchup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.