Skip to content

fix: support natural day span queries#208

Merged
konard merged 2 commits into
mainfrom
issue-207-4d20634ff5bf
Jul 24, 2026
Merged

fix: support natural day span queries#208
konard merged 2 commits into
mainfrom
issue-207-4d20634ff5bf

Conversation

@konard

@konard konard commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • parse ordinal month dates such as 8th august
  • accept the optional of preposition in dates such as 8th of august
  • support days between <date> and <date> and days to <date> as signed day-count queries
  • route natural queries through the existing datetime subtraction and duration conversion behavior

Reproduction

Before this change, all four reported expressions failed to parse:

days between 8th august and now
((8th august - now) as days)
8th of august - now
days to 8th of august

The regression suite covers every reported expression and verifies the deterministic query days between 8th august 2026 and 24th of july 2026 returns 15 days.

Verification

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features
  • node scripts/check-file-size.mjs
  • node --test scripts/*.test.mjs
  • cargo test --all-features --verbose
  • cargo test --doc --verbose
  • cargo build --release --verbose
  • cargo package --list --allow-dirty
  • wasm-pack build --target web --out-dir web/public/pkg
  • npx tsc --noEmit
  • npm test (229 tests)
  • npm run build

Fixes #207
Fixes #203
Fixes #204
Fixes #205
Fixes #206

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: #207
@konard konard self-assigned this Jul 24, 2026
@konard konard changed the title [WIP] Time span conversion to number of days fix: support natural day span queries Jul 24, 2026
@konard
konard marked this pull request as ready for review July 24, 2026 05:56
@konard

konard commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Working session summary

Implemented and finalized the fix in PR #208.

  • Added support for ordinal dates with optional of.
  • Added days between … and … and days to … expressions.
  • Added regression tests covering all four sub-issues.
  • Added the required changelog fragment.
  • Full Rust, WASM, TypeScript, web, formatting, lint, and packaging checks pass.
  • Fresh GitHub CI is fully green.
  • PR is ready for review, mergeable, and the working tree is clean.

Commit: 298f1b12900d365f3c77117d1db09172c251033f


This summary was automatically extracted from the AI working session output.

@konard

konard commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Model: GPT-5.6 Sol
  • Provider: OpenAI
  • Public pricing estimate: $8.190328

📊 Context and tokens usage:

  • 207.9K / 200K (104%) input tokens, 17.5K / 128K (14%) output tokens

Total: (207.9K + 5.3M cached) input tokens, 17.5K output tokens, $8.190328 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.6-sol
  • Thinking level: medium (~15999 tokens)
  • Model: GPT 5.6 Sol (gpt-5.6-sol)

📎 Log file uploaded as Gist (1949KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard

konard commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@konard
konard merged commit dd3fecf into main Jul 24, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant