As the title states, does the SQLite datetime() function accept fractional (REAL/float/etc) values for its modifier clauses? The official documentation doesn't seem to state explicitly one way or another on integer vs real. The fact that it lists NNN for minutes, hours, days, months, and years, but NNN.NNNN for seconds suggests that only seconds would take a fractional value. However, simple testing seems to show that fractional values are acceptable to any of these modifiers.
CREATE TABLE a (rel TEXT);
INSERT INTO a VALUES('0.25 days');
INSERT INTO a VALUES('0.5 days');
INSERT INTO a VALUES('1 days');
INSERT INTO a VALUES('1.5 days');
INSERT INTO a VALUES('2 days');
INSERT INTO a VALUES('7 days');
INSERT INTO a VALUES('14 days');
INSERT INTO a VALUES('0.25 months');
INSERT INTO a VALUES('0.5 months');
INSERT INTO a VALUES('1 months');
INSERT INTO a VALUES('1.5 months');
INSERT INTO a VALUES('6 months');
INSERT INTO a VALUES('0.5 years');
INSERT INTO a VALUES('1 years');
INSERT INTO a VALUES('1.5 years');
SELECT rel, datetime('now', 'localtime', rel) FROM a;
rel datetime('now', 'localtime', rel)
---------- ---------------------------------
0.25 days 2020-03-10 05:21:35
0.5 days 2020-03-10 11:21:35
1 days 2020-03-10 23:21:35
1.5 days 2020-03-11 11:21:35
2 days 2020-03-11 23:21:35
7 days 2020-03-16 23:21:35
14 days 2020-03-23 23:21:35
0.25 month 2020-03-17 11:21:35
0.5 months 2020-03-24 23:21:35
1 months 2020-04-09 23:21:35
1.5 months 2020-04-24 23:21:35
6 months 2020-09-09 23:21:35
0.5 years 2020-09-08 11:21:35
1 years 2021-03-09 23:21:35
1.5 years 2021-09-08 11:21:35
I'm mostly just wondering if anyone has a conclusive answer some other proof or experience if this behavior--correct datetime calculation from fractional modifiers--can be relied upon, or if it's simply a quirk.