Found while reviewing #174. On the raw path (read-model interceptors, or defineQuery without client output), compareValues in Source/Core/queries/queryRendering.ts compares ConceptAs instances via String(concept). A concept over Date therefore sorts by Date.toString() (by weekday name), and a concept over number sorts lexicographically (10 before 2). Unwrap concepts to their underlying value and compare Dates by time before falling back to strings. Add specs with real dates on different weekdays and numbers with different digit counts.
Found while reviewing #174. On the raw path (read-model interceptors, or
defineQuerywithout client output),compareValuesin Source/Core/queries/queryRendering.ts comparesConceptAsinstances viaString(concept). A concept over Date therefore sorts byDate.toString()(by weekday name), and a concept over number sorts lexicographically (10 before 2). Unwrap concepts to their underlying value and compare Dates by time before falling back to strings. Add specs with real dates on different weekdays and numbers with different digit counts.