Overview
| Artifact ID: | 1b4dec4b56856edd86af976e347bc7e79367fcb644736f69aa97416df7ac5468 |
|---|---|
| Ticket: | c03621bf9b262f8c97fe4fbfc077ac8e1b2b7a82
[clock scan] this modifier, again |
| User & Date: | sebres on 2019-04-09 16:51:27 |
Changes
- icomment:
Trying to fix that I noticed that fixing of plural "bug" does not solve the issue (it'd sometimes act as next sometimes as current unit, related to what it is). Additionally noticed that several other cases are "wrong", so e. g. "next"/"last" are related to tNEXT(1)/tUNUMBER(-1) yacc tokens, what causes: <code><pre style="padding-left: 10pt"> % clock format [clock scan "next January" -gmt 1 -base 1554818068] -gmt 1 Thu Jan 09 00:00:00 GMT 2020 % clock format [clock scan "last January" -gmt 1 -base 1554818068] -gmt 1 Sun Dec 30 00:00:00 GMT 2018 </pre></code> where second result is: <ul> <li>invalid</li> <li>would it be valid (Jan 01), it would in wrong year (2019, try April instead of January)</li> <li>if it would be correct, there is additional difference between tNEXT and tUNUMBER: in one case day is retained (e. g. remains 09), in other (tUNUMBER) it gets truncated (mean at start of unit).</li> </ul> There are much more ambiguities: for example <code>last/next day</code> would truncate time (so again start of the unit), but <code>last/next hour</code> would NOT truncate the minute (just an increment hour related to current base), etc pp. So the issue grows further. I'll try to provide proper solution for all this (but would fix it only in my new clock-engine or rather in something like clock-speedup-cr3 doe to compat reasons).
- login: "sebres"
- mimetype: "text/x-fossil-wiki"