| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Verified locally on the PR branch (Python 3.13, editable install), frozen at Wed 2026-08-12:
Full boundary matrix for naturalday(d, weekday=True):
| offset | result |
|---|---|
| today / yesterday / tomorrow | today / yesterday / tomorrow (existing behavior untouched) |
| -2d | last Monday |
| -6d | last Thursday |
| -7d | falls back to format (Aug 05) — correct out-of-range boundary |
| +2d | this Friday |
| +6d | this Tuesday |
| +7d | falls back to format — correct |
| weekday=False (default) | identical to master for all inputs |
Master control: weekday=True raises TypeError: unexpected keyword argument — purely additive, zero risk to existing callers. The new strings are wrapped in _() so they flow through humanize's i18n catalog like the rest of the module.
pytest tests/test_time.py — 383 passed, including the new freeze_time-based tests.
Two non-blocking notes:
Feature is coherent and well-tested. Approving.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary of Changes
Adds an optional weekday: bool = False parameter to naturalday() to format dates within a 6-day window using weekday names (e.g. "this Saturday", "last Sunday") (#102).
Changes Implemented
Testing