---
title: "Discussion on \"Build a 'days since' streak counter in React with localStorage (that survives midnight, DST and bad data)\" | Hashnode"
description: "Discussion on \"Build a 'days since' streak counter in React with localStorage (that survives midnight, DST and bad data)\". \"Days since I last smoked.\" \"Days since the last production incident.\" \"Days without sugar.\" A streak counter looks like the easiest widget in the world: store a start date and subtract. Then it shows"
url: "https://hashnode.com/posts/build-a-days-since-streak-counter-in-react-with-localstorage-that-survives-midnight-dst-and-bad-data/6adfea33510ed6f796990910"
---

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

Discussion

# [Build a 'days since' streak counter in React with localStorage (that survives midnight, DST and bad data)](https://countmydays.hashnode.dev/build-a-days-since-streak-counter-in-react-with-localstorage-that-survives-midnight-dst-and-bad-data?utm_source=hashnode&utm_medium=feed)

"Days since I last smoked." "Days since the last production incident." "Days without sugar." A streak counter looks like the easiest widget in the world: store a start date and subtract. Then it shows

Oct 27 · 6 min read · countmydays.hashnode.dev  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#webdev](https://hashnode.com/tag/webdev)
-   [#tutorial](https://hashnode.com/tag/tutorial)

## Written by

[CountMyDays](https://hashnode.com/@countmydays)

@countmydays

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

Free countdowns & "days since" trackers. No ads. https://www.countmydays.to

Free countdowns &amp; "days since" trackers. No ads. https://www.countmydays.to

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
