Search code examples
javascriptglobalizationjquery-globalization

datejs vs Jquery/globalize


Could someone list the pros and cons of using one over the other. (www.datejs.com vs. https://github.com/jquery/globalize). All I knew is Jquery/globalize supports more culture than datejs.


Solution

  • You can use both of them together. DateJS makes it much more convenient to do math on date objects, and also provides some functionality for displaying dates. Globalize provides functionality for displaying dates for different cultures.

    • If you need to do math on dates and to display internationalized dates, use both. Have Globalize display dates that are calculated with DateJS.
    • If you just need to do math on dates and display dates in a format readable by most Internet users, use DateJS.
    • If you don't need to do math on dates (it might be that the server and APIs take care of it), but need to display internationalized dates, use Globalize.