Skip to content

Conversation

@johnnyt
Copy link
Member

@johnnyt johnnyt commented Sep 7, 2025

Adds comprehensive duration parsing with relative date support:

  • Duration literals: 3d8h30m, 2w, etc.
  • Relative dates: 3d ago, next 2w, last 1h, 2d from now
  • Stack-based evaluation with serializable instructions
  • DateFunctions module for temporal operations
  • Comprehensive test coverage (90.8%)
  • Fixed all credo linting issues and clause grouping

Implements Date+Duration, Date-Duration, and Date-Date operations
with comprehensive test coverage and string visitor support.

Co-Authored-By: Claude noreply@anthropic.com

johnnyt and others added 3 commits September 7, 2025 13:57
Adds comprehensive duration parsing with relative date support:
- Duration literals: 3d8h30m, 2w, etc.
- Relative dates: 3d ago, next 2w, last 1h, 2d from now
- Stack-based evaluation with serializable instructions
- DateFunctions module for temporal operations
- Comprehensive test coverage (90.8%)
- Fixed all credo linting issues and clause grouping

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Implements Date+Duration, Date-Duration, and Date-Date operations
with comprehensive test coverage and string visitor support.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Sep 7, 2025

Codecov Report

❌ Patch coverage is 87.68657% with 33 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
lib/predicator/parser.ex 64.81% 19 Missing ⚠️
lib/predicator/evaluator.ex 85.39% 13 Missing ⚠️
lib/predicator/lexer.ex 98.03% 1 Missing ⚠️
Files with missing lines Coverage Δ
lib/predicator/duration.ex 100.00% <100.00%> (ø)
lib/predicator/functions/date_functions.ex 100.00% <100.00%> (ø)
lib/predicator/functions/system_functions.ex 100.00% <ø> (ø)
lib/predicator/types.ex 100.00% <ø> (ø)
lib/predicator/visitors/instructions_visitor.ex 96.34% <100.00%> (+0.39%) ⬆️
lib/predicator/visitors/string_visitor.ex 98.03% <100.00%> (+0.16%) ⬆️
lib/predicator/lexer.ex 97.22% <98.03%> (+0.77%) ⬆️
lib/predicator/evaluator.ex 90.55% <85.39%> (-0.45%) ⬇️
lib/predicator/parser.ex 82.01% <64.81%> (-3.45%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@johnnyt johnnyt changed the title Temporal updates Adds durations and date arithmetic Sep 7, 2025
@johnnyt johnnyt merged commit 24bcadc into main Sep 7, 2025
13 checks passed
@johnnyt johnnyt deleted the temporal-updates branch September 7, 2025 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants