---
title: "Discussion on \"How to calculate the start and end dates of the previous month using moment\" | Hashnode"
description: "Discussion on \"How to calculate the start and end dates of the previous month using moment\". When managing dates, it is good practice to choose only one robust library and stick to it. To look up later, I wanted to keep one specific moment.js usage here.\nSolution\nStart date of the previous month\nconst startDate = moment().add(-1, 'months').s..."
url: "https://hashnode.com/posts/how-to-calculate-the-start-and-end-dates-of-the-previous-month-using-moment/64037f54b049270c0f6a584e"
---

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

Discussion

# [How to calculate the start and end dates of the previous month using moment](https://serdarsen.hashnode.dev/how-to-calculate-the-start-and-end-dates-of-the-previous-month-using-moment?utm_source=hashnode&utm_medium=feed)

When managing dates, it is good practice to choose only one robust library and stick to it. To look up later, I wanted to keep one specific moment.js usage here. Solution Start date of the previous month const startDate = moment().add(-1, 'months').s...

Mar 4, 2023 · 1 min read · serdarsen.hashnode.dev  
Read the article

-   [#momentjs](https://hashnode.com/tag/momentjs)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#datetime](https://hashnode.com/tag/datetime)

## Written by

[Serdar Sen](https://hashnode.com/@serdarsen)

@serdarsen · Amelia, OH

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

Software Engineer

I'm a skilled developer seeking opportunities in the React, Next.js, or Spring Boot ecosystem. Passionate about building robust and efficient web applications, I bring expertise in these technologies to deliver high-quality solutions. Currently seeking job opportunities that allow me to contribute and grow in these areas. Let's connect and discuss how I can add value to your team! Thanks for visiting my profile! Feel free to check out my Github page at https://github.com/serdarsen.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
