GithubHelp home page GithubHelp logo

Time Until about nsdate-timeago HOT 4 CLOSED

al-little avatar al-little commented on August 17, 2024
Time Until

from nsdate-timeago.

Comments (4)

tjhenry avatar tjhenry commented on August 17, 2024

It looks like this would require either duplicating the timeAgo method or re-factoring timeAgo and timeUntil to use the same numbers and general logic. Interesting idea though.

from nsdate-timeago.

Antoine4011 avatar Antoine4011 commented on August 17, 2024

I would be very interested with this kind of feature too.

from nsdate-timeago.

kevinlawler avatar kevinlawler commented on August 17, 2024

Let's call this feature timeUntil. We can implement it as follows:

  1. Someone (anyone) propose an English template for the new strings which we can review before accepting. This step will not modify the codebase.
  2. (Items 2 and 3 should be submitted at the same time.) Update the logic in the codebase to compute the strings for future dates using the approved template. Refactor and add function aliases as necessary. As @tjhenry suggests, I suspect we'll want the aliases (timeAgo, timeUntil, etc.) to all compute the fully generalized method, but perhaps not.
  3. Update all existing localizations with filler English-to-English versions of the new template and highly visible notices that the localizations are incomplete, with a request for help and a reminder to remove the notice upon completion.
  4. Notify the previous translators that the project has been updated. Politely request that they update the new strings. If the previous translators cannot contribute, find suitable substitute translators.
  5. Note that, as with timeAgo, timeUntil may require localization-dependent logic.

Obviously, more complex than writing an if/else block in English, but also useful to more people.

from nsdate-timeago.

kevinlawler avatar kevinlawler commented on August 17, 2024

It would be nice to solve #11 at the same time, perhaps by adding repeated versions of the base strings with different capitalization formats.

from nsdate-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.