Skip to content

fix: correct Czech strftime() calling wrong SUPER method#103

Draft
Koan-Bot wants to merge 1 commit intocpan-authors:mainfrom
Koan-Bot:koan.atoomic/fix-czech-strftime
Draft

fix: correct Czech strftime() calling wrong SUPER method#103
Koan-Bot wants to merge 1 commit intocpan-authors:mainfrom
Koan-Bot:koan.atoomic/fix-czech-strftime

Conversation

@Koan-Bot
Copy link
Copy Markdown

What

Fix Date::Language::Czech::strftime() which was calling the wrong parent method.

Why

Line 59 called $ref->SUPER::time2str(@a) instead of $ref->SUPER::strftime(@a). Since time2str() expects an epoch integer but strftime() passes a localtime() array reference, the arrayref was coerced to its memory address, producing completely wrong dates (e.g., year 3269 instead of 1999).

The time2str() method on line 52 was correct — only strftime() had the copy-paste bug.

Testing

  • New t/czech-strftime.t covers strftime output, year sanity, and %o format
  • Full suite: 1223 tests pass

🤖 Generated with Claude Code

Czech.pm's strftime() method was calling $ref->SUPER::time2str(@A)
instead of $ref->SUPER::strftime(@A). Since time2str() expects an
epoch integer as its second argument but strftime() passes a
localtime() array reference, the array ref was coerced to a number
(its memory address), producing completely wrong dates (e.g., year
3269 instead of 1999).

Add regression test covering strftime output, year sanity, and %o
format for Czech.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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