Skip to content

Implement Date and DateTime Span support - #52

Merged
rracariu merged 7 commits into
masterfrom
feature/span
Nov 16, 2026
Merged

rracariu merged 7 commits into
masterfrom
feature/span

Conversation

@rracariu

Copy link
Copy Markdown
Contributor

No description provided.

Radu Racariu added 3 commits November 16, 2026 17:34
…exclusive end

- Introduced `Span` struct to represent a DateTime range with timezone awareness.
- Added support for both absolute and relative spans, with various predefined modes (e.g., Today, ThisWeek, PastMonth).
- Implemented methods for creating spans, resolving relative spans to absolute dates, and converting to different time zones.
- Added utility functions for date arithmetic, alignment checks, and formatting.
- Included comprehensive tests to ensure correct functionality across various scenarios, including DST transitions.
chore: update dependencies in Cargo.lock to latest versions
@github-actions

Copy link
Copy Markdown

Coverage after merging feature/span into master will be

82.62%

Coverage Report for Changed Files
FileStmtsBranchesFuncsLinesUncovered Lines
src/haystack/span
   date_span.rs70.17%100%86.96%68.10%136, 149, 161, 213–218, 221–227, 234–235, 238–239, 242–248, 25, 259–264, 267–269, 27, 270–273, 28, 280–281, 284–285, 288–289, 29, 290–294, 31, 314–316, 318, 32, 320–327, 329, 33, 332–336, 34, 36, 368–370, 374–379, 401, 404, 407, 410, 413–414, 417–418, 421–422, 425–426, 429–431, 434–436, 439–441, 68–69, 71–73, 81–82, 84–86
   date_time_span.rs78.17%100%90.79%76.64%138–140, 143–147, 149, 152, 154, 156, 161, 163–166, 168–175, 183, 185–188, 190–197, 289, 312, 315, 321–323, 327–332, 355–357, 370, 390, 394–397, 399–402, 445, 453, 457, 460, 468, 485–488, 494, 497, 502–529, 538–539, 541–542, 548, 551, 555–581, 67, 688, 690, 701, 711, 715, 742–744, 85, 924

@github-actions

Copy link
Copy Markdown

Coverage after merging feature/span into master will be

82.62%

Coverage Report for Changed Files
FileStmtsBranchesFuncsLinesUncovered Lines
src/haystack/span
   date_span.rs70.17%100%86.96%68.10%136, 149, 161, 213–218, 221–227, 234–235, 238–239, 242–248, 25, 259–264, 267–269, 27, 270–273, 28, 280–281, 284–285, 288–289, 29, 290–294, 31, 314–316, 318, 32, 320–327, 329, 33, 332–336, 34, 36, 368–370, 374–379, 401, 404, 407, 410, 413–414, 417–418, 421–422, 425–426, 429–431, 434–436, 439–441, 68–69, 71–73, 81–82, 84–86
   date_time_span.rs78.17%100%90.79%76.64%138–140, 143–147, 149, 152, 154, 156, 161, 163–166, 168–175, 183, 185–188, 190–197, 289, 312, 315, 321–323, 327–332, 355–357, 370, 390, 394–397, 399–402, 445, 453, 457, 460, 468, 485–488, 494, 497, 502–529, 538–539, 541–542, 548, 551, 555–581, 67, 688, 690, 701, 711, 715, 742–744, 85, 924

@rracariu rracariu changed the title Feature/span Implement Date and DateTime Span support Nov 16, 2026
@github-actions

Copy link
Copy Markdown

Coverage after merging feature/span into master will be

85.32%

Coverage Report for Changed Files
FileStmtsBranchesFuncsLinesUncovered Lines
src/haystack/span
   date_span.rs99.54%100%98.46%99.66%322
   date_time_span.rs99.57%100%98.98%99.64%720, 724, 933

@github-actions

Copy link
Copy Markdown

Coverage after merging feature/span into master will be

85.34%

Coverage Report for Changed Files
FileStmtsBranchesFuncsLinesUncovered Lines
src/haystack/span
   date_span.rs99.54%100%98.48%99.66%302
   date_time_span.rs99.58%100%99%99.65%723, 727, 947

@rracariu
rracariu requested a review from garethj2 November 16, 2026 16:21
@github-actions

Copy link
Copy Markdown

Coverage after merging feature/span into master will be

85.44%

Coverage Report for Changed Files
FileStmtsBranchesFuncsLinesUncovered Lines
src/haystack/span
   date_span.rs99.54%100%98.48%99.66%302
   date_time_span.rs99.36%100%98.31%99.48%1014, 785, 789

@rracariu
rracariu merged commit ff10e04 into master Nov 16, 2026
10 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

Development

Successfully merging this pull request may close these issues.

2 participants