Coder Social home page Coder Social logo

Comments (3)

Simacho239 avatar Simacho239 commented on May 10, 2024 3

You can achieve this now with some tweaking to the index.js source file for this module. If you go into your node_modules folder and find the folder for this module, open up the index.js file and go to the getTimeLeft function.

Where you currently have:

hours: parseInt(until / (60 * 60), 10) % 24,

Replace it with:

hours: parseInt(until / (60 * 60), 10) % 24 + parseInt(until / (60 * 60 * 24), 10) * 24,

This will add 24 hours to your hour count for every day value that would've displayed within the day box. Note that you'll need to remodify this line every time your node modules update as it will reset it back to the original function.

from react-native-countdown-component.

qq3094128766 avatar qq3094128766 commented on May 10, 2024 2

thanks, I know this solution, if everyone in svn / git needs to modify the node modules, Hope the author can accept #64 pull requests

from react-native-countdown-component.

alz10 avatar alz10 commented on May 10, 2024

@Simacho239 how do you do it when you only need to display in minutes?
For example instead of 03:00:00 hours i want to display 180:00 minutes

from react-native-countdown-component.

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.