Get the latest tech news

You're Wrong About Dates – and Your Code Is Lying to You


Why your mental model of dates is broken, how programming languages gaslight us about time, and how Decipad’s interval-based approach fixes it.

And it’s not harmless — it leads to broken logic, messy hacks, and subtle bugs that only show up in production. No more picking random timestamps for “March 2024.” Date math that returns human-friendly units instead of weird floats. ScenarioOld Way (Moment-Obsessed)Interval Way (Granularity-Aware)Represent “2023” new Date('2023-01-01T00:00:00.000Z') — silently assumes January 1st at midnight in UTC.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Code

Code

Photo of dates

dates

Related news:

News photo

Byte Buddy is a code generation and manipulation library for Java

News photo

How to use GPT-5 in VS Code with GitHub Copilot

News photo

'Hour of Code' Announces It's Now Evolving Into 'Hour of AI'