Skip to content

Conversation

@NA-V10
Copy link

@NA-V10 NA-V10 commented Nov 23, 2025

Summary

This PR adds a new example module time_tools to the examples/ directory.
It follows the same format and structure as the existing Google examples such as
cipher, including licensing headers, function layout, Fire usage style, and
test patterns.

Details

  • New folder: examples/time_tools/
  • Provides simple time utility functions:
    • now() — returns the current datetime string
    • to_seconds(minutes, seconds) — converts to total seconds
    • add_seconds(time_string, seconds) — adds seconds to a datetime
  • Fire CLI is invoked without a target component, so all module functions
    become CLI commands, consistent with other examples.
  • Includes a full test suite built using testutils.BaseTestCase.

Checklist

  • Example follows Google style (license header, naming, docstrings)
  • Test file included following Google's cipher_test.py pattern
  • No modifications to core Fire library
  • CLA signed

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