Hand-editing “today” in every mail, you will get the date wrong
You put “today” in the greeting and change it to the real day right before send.
You write on Friday and send on Monday. The letter still says Friday. You clone last week’s mail and miss the date more often than you catch it. That is not a carelessness problem. Dates should not go through the keyboard.
CodeExpander splits dates into two jobs: write today (or today plus a few days) with no popup, and open a calendar so you click a day. Both live in the snippet. Both expand in whatever is focused. Syntax is in Dates and time.
%filldatepicker% opens a calendar; %date% inserts today with no popup.
Always today: no calendar
The header on meeting notes, the first line of a daily log, “written on” in a signature — you want the day of expand, not a second click.
Today is %date&format=LL&lang=en%
Tomorrow is %date&format=LL&lang=en&calc=1%%date% does not open the FillIn window. The number is already computed when you press the trigger. It uses this computer’s local calendar, offline. Cross a date line on a trip and “today” is whatever this machine says now, not the day you left. calc shifts by days. Twists like “next Thursday” or “three business days” use expr; spaces and plus signs become %20 and %2B. Do not put calc and expr on the same variable.
Formats are dayjs: YYYY-MM-DD for machines, LL / LLLL for people. Set lang to en or zh-cn instead of hoping the body language is enough. The full table is on Dates and time.
A day someone must pick: a calendar field
A contract due date, a shop appointment, an invoice period — the day is not fixed, or it changes every time. Use %filldatepicker%. The FillIn window shows a calendar. You click a day, then confirm with the other fields.
Due %filldatepicker&name=due&format=LL&lang=en%It is still one FillIn slot with a name. If the same due date appears twice, reuse name=due and click once. Confirm is still ⌘/Ctrl+Enter. The form mechanism is A placeholder is not a form.
Do not turn “today” into a date picker. The extra click is how yesterday gets sent.
Put the date in the snippet that needs it
Date tokens follow the mail, the notes, the contract you already have. Do not create a group that only stores date formulas and give it a name that sounds like a product feature. The library is for hands: if this letter needs today, write %date% in this letter.
Relative dates are the same. +3bd is three business days, not an item in a special pack. Use the expr you need in that body. The parameter list stays on Dates and time.
Tonight, fix one header
- Open the snippet you send most, the one where you always rewrite the date. Replace a hard-coded month with
%date%in the format you already type. See Dates and time. - If a due date changes every time, add
%filldatepicker%and call itdue. - Expand it in mail. Automatic dates must not open a calendar. A due date must open one cell. If that holds, the snippet keeps up.
FillIn, including date tokens, is in the free tier. The 50 snippet / 5 group cap still counts. See Pricing.
Do not
- Do not open the letter and change “today” by hand. Missing that edit is the default outcome, not a surprise.
- Do not build a dates-only group and name it like a feature. Write the token in the snippet that needs it.
- Do not set
calcandexpron the same%date%. - Do not reach for a script to format a date unless you are actually computing something outside local calendar math. Start with the variable. Scripts belong in Developer boilerplate.
Next: A placeholder is not a form.