Giter VIP home page Giter VIP logo

Comments (5)

rmm5t avatar rmm5t commented on May 22, 2024

I think that's a good design change. Timeago is due for a small rewrite to accommodate suggestions like this and to accommodate other often requested features.

from jquery-timeago.

Soviut avatar Soviut commented on May 22, 2024

I wouldn't mind trying to help with that. Especially if we can adapt it to CoffeeScript as a pre-processing step.

from jquery-timeago.

arcanis avatar arcanis commented on May 22, 2024

There is an problem with this : if, for example, there is a single 1-second element, and a thousand 1-month elements, using a single timer will trigger the event for every 1-month element at each second.

I think we should have a timer for each duration (1 second, 1 minute, 1 hour, 1 day, 1 week, 1 month, 1 year), each one having its own list of elements.

from jquery-timeago.

Soviut avatar Soviut commented on May 22, 2024

Not a bad idea. However, I assumed an object could do the same thing. Simply use second intervals as keys. I'm not sure which would be more efficient, but it would potentially keep the logic more centralized than several disparate timers.

var intervals = {
    1: [ ... ],
    60: [ ... ],
    3600: [ ... ],
    etc
}

from jquery-timeago.

rmm5t avatar rmm5t commented on May 22, 2024

Closing this out in favor of discussions on #90 and #122.

from jquery-timeago.

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.