All rules

A time range that ends before it starts

time-range-reversedon by defaultJapanese / English

A time range whose end comes before its start

Example

Flagged
The workshop runs from 2:00 to 1:30 pm.
What chaff prints
1:24 The time range "2:00 to 1:30 pm." ends before it starts
Fixed
The workshop runs from 2:00 to 3:30 pm.
What chaff prints
no finding

How to fix

Check both times and correct the wrong one. If the range runs past midnight, mark the end as the next day.

Why it matters

When a time range such as "15:15–14:15" ends before it starts, the reader has to ask when it really ends, and the times after it are in doubt too. It happens when only one of the two times is changed, or when a line is copied from the one before. Two times are read as a range when only a range mark (–, —) or a word such as "until" stands between them, or when they are written "from … to …". When only one side carries a.m. or p.m., the other is read the same way ("2:00–1:30 pm" is 2 pm to 1:30 pm). A table with the start and the end in separate columns, such as a timesheet (Time in and Time out, Start and End), is compared row by row.

What it does not flag

A range whose end is marked as the next day ("22:00–6:00 +1"), a range that goes back three hours or more (overnight, as 22:00–6:00, or a 12-hour clock, as 9:00–5:00), "from … to …" in a sentence that changes a time ("moved from 3:00 to 2:00"), and numbers without a time mark are not compared. Where only one side carries a.m. or p.m., a range may cross noon ("8:00–6:00 pm"), so only a step back of less than an hour is reported. A range with the same a.m. or p.m. on both sides (9:00 AM – 5:30 AM) is reported however far it goes back. A timesheet row is not compared when the document shows night work (night shift, overnight, 6:00 +1, 25:00), nor when its hours fit a shift past midnight (22:00, 6:00, a 0:30 break, 7.50 hours).

Turning it off or relaxing it

Silence this one spot (in the document)
<!-- stet: time-range-reversed — reason -->
Relax it for the team (the reason is kept as a comment in chaff.yaml)
npx chaffjs relax time-range-reversed --why "reason"
Turn it off for the team (chaff.yaml)
rules: time-range-reversed: off
Technical details
Layer
L3
Status
stable
Severity
warning
Languages
Japanese and English
Suited to
business, technical, blog, legal, docs, academic, literature, speech
Reads from the document
dates

Levels

Set a level for this rule under rules in chaff.yaml. With nothing set, it runs at the level its genre gives it (see By genre below).

stricterror
normalwarning
relaxedinfo

This rule has no limit to count to. A level sets how a finding is marked: relaxed keeps the finding and marks it a step lower.

By genre

Runs by default in
technical/spec, technical/readme, blog/tech, blog/essay, blog/owned-media, business/proposal, business/report, business/email, business/press-release, business/meeting-notes, legal/contract, legal/statute, legal/judgment, legal/patent, docs/manual, docs/faq, docs/glossary, academic/paper, speech/address, speech/transcript
Turned off by the genre in
literature/fiction, literature/essay, literature/poetry, literature/play

Genres

Message

The time range "{range}" ends before it starts

{end_label} "{end}" is before {start_label} "{start}"

This page is built from the rule's definition file:packages/chaff/rules/time-range-reversed.yaml