Why the study plan stores a plain date

What 'today' means when a study plan meets time zones, and why we store a calendar day instead of a moment.

Photo by Muhammad Faiz Zulkeflee on Unsplash

When we built the free study planner for Braineos, one small decision caused most of the thinking: what does “today” mean?

A study plan is a schedule of days. The learner picks a start day and an exam day, and the planner spreads the work between them. That sounds simple until you remember that a day is not the same moment everywhere. If a plan stores a point in time, such as midnight on the start day, then a learner who travels, or whose device changes time zone, can find their plan shifted by a day.

So the plan’s start date is stored as a plain date, with no time or time zone attached. A plain date reads the same everywhere. “Today” on the home card is then worked out in the learner’s own browser time zone, and the two are compared as dates. The plan stays put, and “today” follows the learner.

The takeaway: store what the learner means. They mean a calendar day, so we store a calendar day.

Planning an app?

We build learning products like this for clients too: courses, flashcards, quizzes and exam prep, on the web and mobile.

Education apps: what we do →

Start a project