Grokking the Modern Frontend System Design Interview
0% completed
Design a Date Picker
Two travelers use the same flight search on Skyway, a flight booking site, and both click Tuesday, March 4 in the same date picker. The traveler in Lisbon gets results for March 4. The traveler in Tokyo gets results for Monday, March 3.
The date picker code is identical in both browsers. It turns the click into a JavaScript Date at midnight on March 4 in the browser's own time zone, then sends that moment to the server in UTC. In Lisbon, midnight on March 4 is midnight UTC
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%