I want to develop a small script where users can embed their "schedules". However, I need help in determining the logic for creating the database structure and how to enter the "time" of events in the database.
It should be noted, however, that when users enter their “schedule,” they will not enter exact dates. Instead, they will enter "days of the week." Rather, as a "recurring" appointment.
For example, user A might enter the following schedule:
MWF - 8:00 - 10:00 MW - 14:00 - 15:00, etc.
As you can see, I'm looking for a way to use common "days of the week", not necessarily exact dates.
Given this, what would be the best way to store this in a database, knowing that in the end I can "query" the database to search for available times.
Should I enter them in milliseconds or seconds? From "0" at 12:00 on Sunday?
Any suggestions would be great.
Thanks!
source
share