Date shortcuts like +7, +2w and mon with SQLite date modifiers in a Uniface service
A follow-up form in a Uniface customer app has a due date field. Typing 30.11.2026 works, but most follow-ups are "in a week" or "next Monday". So the field now also accepts shortcuts and shows what they mean: Input Result shown today , t today tomorrow , tm tomorrow +7 in 7 days +2w in 14 days mon ... sun the next such weekday, never today 31.12.2026 , 2026-12-31 that date The label also says if…
In a Uniface customer application, a follow-up form contains a due date field that can accept both standard dates like 30.11.2026 and shortcuts such as +7 or +2w. These shortcuts display their meaning to the user.
The field supports expressions like today, t (tomorrow), tm (tomorrow), +7 (in 7 days), +2w (in 14 days), and mon (next Monday). If the day falls on a weekend or holiday from the app's holiday table, the label indicates this information as well.
SQLite is used to handle the date calculations, where the date() function takes modifiers that cover various time units, except for parsing input dates. The DAY_INFO service operation takes the input string, generates a modifier string, and queries SQLite for the resulting date. In a second query, it builds the label based on the resulting date.
The app's existing date parser (PARSE_DAY) rejects impossible dates, such as 30.02. The DAY_INFO operation converts input dates into a modifier string for SQLite and then retrieves the corresponding date. Finally, it constructs the label based on the obtained date information.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.