Skip to content

docs: clarify weekday range behavior and week start day#5172

Open
vincent067 wants to merge 1 commit into
prometheus:mainfrom
vincent067:docs/weekday-range-clarification
Open

docs: clarify weekday range behavior and week start day#5172
vincent067 wants to merge 1 commit into
prometheus:mainfrom
vincent067:docs/weekday-range-clarification

Conversation

@vincent067
Copy link
Copy Markdown

@vincent067 vincent067 commented Apr 12, 2026

Clarify that Alertmanager follows Go's time.Weekday convention where Sunday = 0 and Saturday = 6. This differs from ISO 8601 where Monday is the first day of the week.

Also explain that weekday ranges do not wrap around the week boundary, so saturday:sunday will not match any day and should be written as ['saturday', 'sunday'] instead.

Fixes #3213

Summary by CodeRabbit

  • Documentation
    • Updated weekday_range specification documentation with clarification on weekday numbering system (Sunday=0, Saturday=6), explanation of non-wrapping range behavior across week boundaries, and practical guidance for configuring day combinations correctly.

Clarify that Alertmanager follows Go's time.Weekday convention where
Sunday = 0 and Saturday = 6. This differs from ISO 8601 where Monday
is the first day of the week.

Also explain that weekday ranges do not wrap around the week boundary,
so saturday:sunday will not match any day and should be written as
['saturday', 'sunday'] instead.

Fixes prometheus#3213
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2a37b283-8180-44ee-8015-56ec246f749e

📥 Commits

Reviewing files that changed from the base of the PR and between 423d1c5 and 3517ec5.

📒 Files selected for processing (1)
  • docs/configuration.md

📝 Walkthrough

Walkthrough

Documentation updated to clarify Alertmanager's weekday numbering scheme, explaining that it uses Go's time.Weekday convention (Sunday=0) rather than ISO 8601, and that weekday ranges do not wrap across week boundaries.

Changes

Cohort / File(s) Summary
Documentation Updates
docs/configuration.md
Added clarification text explaining Go time.Weekday numbering (Sunday=0, Saturday=6) for weekday_range specifications, noting that ranges do not wrap (e.g., saturday:sunday matches nothing) and providing guidance to use separate days or sunday:saturday for matching all days.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the documentation update about weekday range behavior and the week start day convention.
Description check ✅ Passed The PR description clearly explains the changes, references the linked issue, and matches the template requirements for a documentation update.
Linked Issues check ✅ Passed The PR directly addresses issue #3213 by documenting Alertmanager's use of Go's time.Weekday convention and clarifying that weekday ranges do not wrap.
Out of Scope Changes check ✅ Passed The change is a documentation-only update directly addressing the requirements in issue #3213 with no out-of-scope code modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

Document first day of week for time intervals

2 participants