Skip to content

Commit a6c8d22

Browse files
CopilotByron
andcommitted
Improve documentation for is_relative_date function
Co-authored-by: Byron <63622+Byron@users.noreply.github.com>
1 parent 8103ed5 commit a6c8d22

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

gix-date/tests/time/baseline.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ struct Sample {
1414
seconds: SecondsSinceUnixEpoch,
1515
}
1616

17-
/// Returns true if the pattern looks like a relative date (e.g., "1 day ago").
17+
/// Returns true if the pattern looks like a relative date of the form "N unit ago".
18+
/// Note: This only covers the relative dates tested in the baseline (e.g., "1 day ago").
19+
/// Other relative formats like "yesterday", "last week" etc. are not included in baseline
20+
/// testing because they would require additional handling in the baseline script.
1821
fn is_relative_date(pattern: &str) -> bool {
1922
pattern.ends_with(" ago")
2023
}

0 commit comments

Comments
 (0)