Minor typo in documentation
In the page on "Date and Time Functions" (https://sqlite.org/lang_datefunc.html), the explanation of format strings has the following detail about the %H modifier:
%H hour: 00-24
Is it supposed to be 00-23 rather than 00-24? I have tried various values of time, and different numbers of minutes and hours subtracted from them, but have never been able to get strftime to return 24 with %H. What would hour 24 even mean. I thought times in a day only go from 00:00:00 to 23:59:59. What does a time of 24:00:00 mean?
Your observation of what the doc says is correct. However, opinions may vary on whether it represents a typo or a bug. It reflects what the functions do. And what they do is arguably in line with Postel's law, which urges leniency on input and rigor on output.
As an example for discussion consider this session screen-scrape:
sqlite> select datetime( julianday('2000-01-01T24:59') );
. The result is sensible, and allows somebody who may be less than utterly familiar with the 24-hour time format to speak of the earliest morning hour without mention of the zero hour. (The fact that it's in the next day is another issue; the result is logical.)
There will be no mention of hour 24 in 24-hour output from the datetime/time functions. And whether somebody exploits the input leniency is up to them.
Ah, I see. So, allowance up to 24 is made to accommodate slightly erroneous input. I was looking at it purely from the output standpoint, and thought it was a typo in the documentation. Thank you.
According to https://en.wikipedia.org/wiki/24-hour_clock#Midnight_00:00_and_24:00 24 can make it clearer that your referring to midnight in the context of a day's end rather than beginning.