Skip to content

Compare raw concept and Date values correctly when sorting in memory #176

Description

@woksin

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions