Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
RunKit + npm: date-fns
node v18.11.0
endpoint
share
tweet
var dateFns = require("date-fns") var totalDuration = dateFns.intervalToDuration({ start: new Date(1929, 0, 15, 12, 0, 0), end: new Date(1968, 3, 4, 19, 5, 0) }) dateFns.formatDuration(totalDuration, { format: ['years', 'months'], delimiter: ', ' })
Created from: https://npm.runkit.com/date-fns
Loading…
Clone and edit this document