Graham
← All posts

When does a food day end?

It's 12:40am. You got home late, you're standing at the counter eating a bowl of cereal, and you go to log it. Which day does it go on?

The obvious answer is the clock: it's after midnight, so it's tomorrow. I think that's the wrong answer for food.

Midnight splits your evening in half

Think about what that bowl actually is. It's the end of tonight. You haven't slept, you're going to bed after it, and tomorrow hasn't started in any sense that matters to you. Midnight is the date changing, not your day ending.

If you log it to tomorrow anyway, both days come out a little wrong. Tonight looks lighter than it was, because the last thing you ate is missing. Tomorrow starts with calories you ate before you went to sleep, so by lunch it looks like you've had a bigger morning than you did.

Once, that doesn't matter. The trouble is that for a lot of people, late eating is a habit rather than an accident. If you're regularly up past midnight with something to eat, every one of your days is shifted the same way, and it shows up exactly where you'd look for patterns. Your evenings look emptier than they are, your mornings look fuller, and neither one is telling you what you actually ate.

A day is waking to sleeping

The definition that actually fits food is simpler than the calendar's. A day is from when you get up to when you go to bed. Anything you eat before you sleep belongs to the day you're still awake in.

You can't ask a tracker to know when you went to sleep, so in practice that means picking a cutoff hour that sits after your usual bedtime and before your usual morning. For most people that's somewhere in the small hours, and for most people the exact hour barely matters, because not many people are eating at 3am.

What does matter is that the cutoff stays put. If 12:40am goes on tonight this week and on tomorrow next week, your days stop being comparable with each other, and that costs you more than either choice would on its own. Your weight trend is already built from a week of readings averaged rather than any one morning, and the food side deserves the same treatment: the same rule every day, so the days line up.

Where I put the line

In Graham, the day turns at 2am local time. A 1am snack is part of tonight, it goes on tonight's log, and it lands in tonight's conversation rather than opening a fresh one in the middle of a sentence. At 2am the day turns over, and the next thing you tell him starts the new one.

2am wasn't the first answer. The first was 4am, and both hours put the cereal on tonight, which was the part I cared about. But 4am reads as early morning, and a day that ends in early morning felt like it was claiming the start of tomorrow. 2am reads as late night, which is what it is.

The same boundary decides the rest of what you tell him. A weigh-in you give him at 1:30am counts for the day that's ending, the day view turns over at 2, and the line Graham opens each day with arrives on the day you wake up to, not the one you fell asleep in.

If your day doesn't fit

A fixed hour is a guess about when people sleep, and it's a guess that's wrong for some of them.

Night shifts are the obvious case. If you work 10pm to 6am, 2am lands in the middle of your working day and splits your shift's food across two days, which is the same problem midnight causes for everyone else. There's no hour that fixes that, because your day doesn't line up with the calendar at all. What does work is deciding which date your shift belongs to and logging it there every time. Graham takes "that was yesterday's" and "log this to last night", up to two weeks back, so you can keep a shift together even when the clock splits it.

Travel bends it the other way. Fly east and a day might be 20 hours long; fly west and it might be 28. Graham goes by the local clock, so the day follows you, and the day you travel comes out short or long. I wouldn't try to correct for it. It's one odd day, and a week averages it away.

Very late nights are the easy one. If you're up until 3 once in a while, the cutoff will put your last snack on tomorrow. Say it was last night's and it moves. If you're up until 3 most nights, a cutoff that splits your evening every time isn't a fit for you, and you're in the night-shift case: decide which date your late food belongs to, and log it there every time.

What I'm not telling you

There's no correct hour. The date on a log is bookkeeping, and nothing about 2am is special except that it's late enough to catch most late nights. If your tracker uses midnight and you're always asleep by 11, you'll never notice the difference, and you shouldn't go looking for a problem.

The point is narrower than that. If you eat after midnight with any regularity, check where those logs are going, and make sure it's the same place every time. The calendar date is the one thing that changed at midnight, and your evening was still going.

— Ryan