---
title: "Discussion on \"Java Integer Overflow: Calculating Milliseconds in a Month\" | Hashnode"
description: "Discussion on \"Java Integer Overflow: Calculating Milliseconds in a Month\". Understand why calculating milliseconds in a month causes integer overflow in Java, why assigning to long fails, and how to fix silent arithmetic bugs."
url: "https://hashnode.com/posts/java-integer-overflow-milliseconds-in-a-month/6aec4a31a3814663a78aeb13"
---

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

Discussion

# [Java Integer Overflow: Calculating Milliseconds in a Month](https://doogal.dev/java-integer-overflow-milliseconds-in-a-month?utm_source=hashnode&utm_medium=feed)

Understand why calculating milliseconds in a month causes integer overflow in Java, why assigning to long fails, and how to fix silent arithmetic bugs.

Nov 5 · 4 min read · doogal.dev  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#softwareengineering](https://hashnode.com/tag/softwareengineering)
-   [#programming](https://hashnode.com/tag/programming)
-   [#computerscience](https://hashnode.com/tag/computerscience)

## Written by

[Doogal Simpson](https://hashnode.com/@doogal)

@doogal

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

"hey doogal, what is .... ?"

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
