---
title: "Discussion on \"How to humanize duration accurately in JavaScript, including weeks, months and years\" | Hashnode"
description: "Discussion on \"How to humanize duration accurately in JavaScript, including weeks, months and years\". It is very simple, that you might not need a library, although there are cautions.\nThat is, using Date object. Be aware of months and leap years. Don't try to use straight simple approximation of raw milliseconds.\nLet me say this first. I still have ..."
url: "https://hashnode.com/posts/how-to-humanize-duration-accurately-in-javascript-including-weeks-months-and-years/5fccc1d67d1d8b0b08747607"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to humanize duration accurately in JavaScript, including weeks, months and years](https://polv.hashnode.dev/how-to-humanize-duration-accurately-in-javascript-including-weeks-months-and-years?utm_source=hashnode&utm_medium=feed)

It is very simple, that you might not need a library, although there are cautions. That is, using Date object. Be aware of months and leap years. Don't try to use straight simple approximation of raw milliseconds. Let me say this first. I still have ...

Dec 6, 2020 · 3 min read · polv.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#typescript](https://hashnode.com/tag/typescript)
-   [#web-development](https://hashnode.com/tag/web-development)

## Written by

[Pacharapol Withayasakpunt](https://hashnode.com/@polv)

@polv

  
[View profile](https://hashnode.com/@polv)

typescript,publicheath,datascience,medicine,health

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
