Dates in Code & Data
Practical guidance for JavaScript, Python, databases and data exchange, so stored dates keep their meaning.
Code is where date assumptions turn into bugs. These guides show how JavaScript, Python and SQL databases represent dates, instants and local times, with short snippets you can run.
The common thread is to store what a value means: a date or an instant, plus a zone name when a local time matters.
4 guides in this topic
JavaScript Dates: A Practical GuideUnderstand timestamps, date parsing and local versus UTC output in JavaScript.Python datetime: Dates, Times and Time ZonesChoose the right Python type for dates, durations and time-zone-aware instants.How to Store Dates and Times in a DatabaseStore dates, exact events and future local appointments without losing their meaning.Date-Only Values vs. TimestampsAvoid unintended day shifts when storing birthdays, holidays and deadlines.