Skip to content

Add Time::Piece and Time::Seconds modules#296

Merged
fglock merged 1 commit intomasterfrom
feature/time-piece-module
Mar 10, 2026
Merged

Add Time::Piece and Time::Seconds modules#296
fglock merged 1 commit intomasterfrom
feature/time-piece-module

Conversation

@fglock
Copy link
Owner

@fglock fglock commented Mar 10, 2026

Summary

  • Adds Time::Piece module for date/time manipulation with full date arithmetic
  • Adds Time::Seconds module for duration constants and calculations
  • Adds POSIX.java with strftime() and mktime() functions
  • Includes port-cpan-module skill documenting the porting process

Implementation Details

  • TimePiece.java provides XS replacement functions: _strftime, _strptime, _crt_localtime, _crt_gmtime, _mini_mktime, _get_localization
  • Uses java.time.format.DateTimeFormatter with manual format code mapping
  • Time/Piece.pm and Time/Seconds.pm adapted from original CPAN sources (~80% reused)

Test plan

  • Week number calculations match system Perl
  • strftime format codes work correctly
  • Date arithmetic produces expected results

Generated with Devin

Implements Time::Piece date/time manipulation module with:
- TimePiece.java providing XS replacement functions (_strftime, _strptime,
  _crt_localtime, _crt_gmtime, _mini_mktime, _get_localization)
- Time/Piece.pm adapted from CPAN with full date arithmetic support
- Time/Seconds.pm for duration constants and calculations

Also adds POSIX.java with strftime() and mktime() functions using
java.time.format.DateTimeFormatter with manual format code mapping.

Includes port-cpan-module skill documenting the porting process.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <noreply@cognition.ai>
@fglock fglock merged commit f22d841 into master Mar 10, 2026
2 checks passed
@fglock fglock deleted the feature/time-piece-module branch March 10, 2026 14:37
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