by senlutomchen · 8y ago · 0 comments
I.e Does "Last 2 days" indicate: A. Last 48 hours? B. Yesterday + Today up to now C. Yesterday + the day before.
This is a difficult subject.
Recurrence is especially tough to model in a database.
Often the user means "same day of the week, four or five weeks from now".
Gets it right for you. If I mean today, I say today. This is especially true when I'm talking to a computer.
Sometimes we need to use non-human language to communicate intent correctly to a computer, but we shouldn't let that redefine perfectly good and well established human language.
Your definition has the same issue that mine does, just with sunrise being the time around which the meaning of tomorrow is unclear. How high does the sun have to be before "today" becomes defined and the meaning of "noon tomorrow" shifts by 24 hours? If I wake up before sunrise, does tonight refer to now or to after the next sunset?
There's a certain amount of ambiguity inherent to the English language.
Just print the date and time.