Skip to content

Improve documentation coverage#512

Merged
LordSimal merged 2 commits into3.xfrom
improve-documentation
Mar 25, 2026
Merged

Improve documentation coverage#512
LordSimal merged 2 commits into3.xfrom
improve-documentation

Conversation

@dereuromark
Copy link
Copy Markdown
Member

Summary

Addresses documentation gaps identified in the codebase:

  • Expand README with ChronosTime, setTestNow(), and ClockFactory (PSR-20) examples
  • Improve ClockFactory class and method documentation
  • Add detailed docs for createInterval() explaining time unit rollover behavior
  • Improve average() docs with example showing midpoint calculation
  • Improve diffFiltered() docs with callback signature and usage example
  • Improve nthOfMonth/Quarter/Year docs explaining the false return case

The README now covers more of the public API including commonly used testing utilities.

- Expand README with ChronosTime, setTestNow, and ClockFactory examples
- Improve ClockFactory class and method documentation
- Add detailed docs for createInterval() explaining rollover behavior
- Improve average() docs with example showing midpoint calculation
- Improve diffFiltered() docs with callback signature and example
- Improve nthOfMonth/Quarter/Year docs explaining false return case
@dereuromark dereuromark added this to the 3.next milestone Mar 22, 2026
- Clarify @param for $dayOfWeek to specify Chronos constants
- Improve min() docs explaining it returns the earlier datetime
- Improve max() docs explaining it returns the later datetime
- Document that null defaults to current time for min/max
@dereuromark dereuromark requested a review from LordSimal March 22, 2026 23:16
@LordSimal
Copy link
Copy Markdown
Contributor

The only thing I can mention here is the fact, that the new Vitepress docs in docs should also probably reflect this change (if it not already does)

@dereuromark
Copy link
Copy Markdown
Member Author

dereuromark commented Mar 25, 2026

Yes, I plan to make a full follow up here after we finished it all with the minor release and stuff.

@dereuromark
Copy link
Copy Markdown
Member Author

Feel free to merge if all good.

@LordSimal LordSimal merged commit 847e4b1 into 3.x Mar 25, 2026
8 checks passed
@LordSimal LordSimal deleted the improve-documentation branch March 25, 2026 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants