Skip to content

Use portable date formatting in stats banner#109

Open
ChimdumebiNebolisa wants to merge 1 commit into
Hack-HQ:mainfrom
ChimdumebiNebolisa:fix/banner-portable-date
Open

Use portable date formatting in stats banner#109
ChimdumebiNebolisa wants to merge 1 commit into
Hack-HQ:mainfrom
ChimdumebiNebolisa:fix/banner-portable-date

Conversation

@ChimdumebiNebolisa

Copy link
Copy Markdown
Contributor

Summary

Replace glibc-only %-d strftime with portable date formatting in the stats banner SVG.

Problem

generate_banner.py used strftime("%B %-d, %Y"), which raises ValueError on Windows. CI passes on Linux, but local banner regeneration on Windows fails silently behind a warning.

Changes

  • Add format_banner_date helper using dt.day
  • Allow optional today in svg() for deterministic tests
  • Regression tests for formatting and SVG output

Validation

  • python -m unittest discover -s .github/scripts -p "test_*.py" - OK (includes BannerDateFormat)

Scope

SVG layout unchanged; only the "as of" date string construction.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant