date-fns VS underscore

Compare date-fns vs underscore and see what are their differences.

date-fns

⏳ Modern JavaScript date utility library ⌛️ (by date-fns)

underscore

JavaScript's utility _ belt (by jashkenas)
Our great sponsors
  • Nanos - Run Linux Software Faster and Safer than Linux with Unikernels
  • Scout APM - A developer's best friend. Try free for 14-days
  • SaaSHub - Software Alternatives and Reviews
date-fns underscore
41 11
26,939 26,227
0.0% -
9.1 7.1
2 months ago about 1 month ago
JavaScript JavaScript
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

date-fns

Posts with mentions or reviews of date-fns. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-10-31.

underscore

Posts with mentions or reviews of underscore. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-10-26.
  • 20+ JavaScript Utilities to Boost Your Productivity As a Developer
    15 projects | dev.to | 26 Oct 2021
    23. Underscore
  • Is Math.random() suitable for production?
    1 project | reddit.com/r/reactjs | 22 Sep 2021
    Example of correct implementation https://github.com/jashkenas/underscore/blob/master/modules/sample.js
  • Most popular JavaScript frameworks and libraries 2021
    17 projects | dev.to | 24 Aug 2021
    Underscore - JavaScript's functional programming helper library.
  • The Frontend Hitchhiker's Guide: 3rd Party Code
    18 projects | dev.to | 17 Jul 2021
    These are libraries that are small and focused on making a specific problem easier for the developer. Moment.js can make displaying time based data and perform various operations with it. Underscore adds a collection of functional programming primitives to JavaScript if that's your cup of tea. Lodash is similar in providing functions to make working with arrays, numbers objects easier.
  • Lodash in 2021: Necessary or Obsolete?
    2 projects | dev.to | 24 Jun 2021
    If you have a couple of years as a developer, you've probably used either Lodash or Underscore.js. These are two libraries that provide a bunch of utilities to manipulate data, particularly array and objects.
  • Create an Odoo 14 Markdown Widget Field with TDD - Part 2
    4 projects | dev.to | 11 May 2021
    Debouncing an input in JavaScript is a common technique to reduce the rate of execution of a function. If a user is typing inside an input and you execute a function on each change of that input (each letter typed) it can quickly lead to a lot of computation power being used on just that. The common technique is called debounced and it will delay the execution of the function listening to the input, only every X secondes. Odoo use _.debounce for this with the underscorejs library.
  • Create a memoized function in JavaScript
    1 project | dev.to | 7 May 2021
    One of the first software development courses I ever took involved recreating the well known JavaScript library Underscore.js from scratch. Implementing more basic ones like each or map were manageable for me, but when we reached the more advanced ones, I was unable to keep up. One of the functions that really gave me a lot of trouble was memoize. I figuratively banged my head up against the wall with this function for countless hours until one of my peers had to just show me how to do it. I was definitely overthinking it, and even after my peer explained how it worked, I didn't fully understand it. After encountering the memoization concept while learning React and researching more algorithmic functions, I revisited the memoize function and feel like I understand the concept and implementation.
  • 5 Ways to Increase Your Efficiency as a Developer
    3 projects | dev.to | 22 Apr 2021
    But don’t overdo it. You shouldn’t import underscore or lodash just to loop through an array. It only increases your package size and hurts the user experience.
  • 21 Popular JavaScript Libraries Every Web Developer Should Know
    13 projects | dev.to | 18 Apr 2021
    Underscore is a lower level JavaScript library. Lower level in that it’s very close to vanilla JavaScript. All it does is provide you with some helpers and tools to create web applications faster.
  • Node.js native ESM support for Underscore.js, available for tryout through npm install [email protected]
    1 project | reddit.com/r/javascript | 9 Mar 2021

What are some alternatives?

When comparing date-fns and underscore you can also consider the following projects:

dayjs - ⏰ Day.js 2kB immutable date-time library alternative to Moment.js with the same modern API

Luxon - ⏱ A library for working with dates and times in JS

lodash - A modern JavaScript utility library delivering modularity, performance, & extras.

countdown.js - Super simple countdowns.

moment - Parse, validate, manipulate, and display dates in javascript.

moment-timezone - Timezone support for moment.js

fecha - Lightweight and simple JS date formatting and parsing

ramda - :ram: Practical functional Javascript

Sugar - A Javascript library for working with native objects.

tz-format - Format a date with timezone

jquery-timeago - :clock8: The original jQuery plugin that makes it easy to support automatically updating fuzzy timestamps (e.g. "4 minutes ago").

javascript-time-ago - International highly customizable relative date/time formatting