Skip to content

Add customizable date and time formats (fixes #25)#31

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/fix-ff56f57c-6b2b-4f3b-b826-153f30b2e9da
Draft

Add customizable date and time formats (fixes #25)#31
Copilot wants to merge 3 commits intomainfrom
copilot/fix-ff56f57c-6b2b-4f3b-b826-153f30b2e9da

Conversation

Copy link

Copilot AI commented Sep 12, 2025

Addresses issue #25 by adding support for customizable date and time formatting in meeting issue titles and agenda times.

Problem

The action currently uses the server's locale for date and time formatting, which produces formats like MM/DD/YYYY dates and 12-hour times. Users wanted the ability to use ISO-8601 YYYY-MM-DD date format and 24-hour time format for better standardization and international compatibility.

Solution

Added two new optional input parameters with backward-compatible defaults:

  • DATE_FORMAT: Controls date formatting in issue titles and outputs

    • locale (default): Uses system locale formatting (e.g., 1/15/2025)
    • iso: Uses ISO-8601 format (e.g., 2025-01-15)
  • TIME_FORMAT: Controls time formatting in meeting time displays

    • 12 (default): Uses 12-hour format with AM/PM (e.g., 2:30 PM)
    • 24: Uses 24-hour format (e.g., 14:30)

Usage Examples

Default behavior (unchanged):

- uses: target/create-meeting-issue@v1
  with:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

ISO-8601 dates with 24-hour times:

- uses: target/create-meeting-issue@v1
  with:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    DATE_FORMAT: iso
    TIME_FORMAT: 24

Implementation Details

  • Created new formatDate.ts utility module with formatDate(), formatTime(), and formatDateTime() functions
  • Updated extractInput.ts to parse the new format parameters with proper defaults
  • Modified output.ts to use configurable date formatting for issue titles and GitHub Action outputs
  • Updated generateMeetingTimes.ts to use configurable time formatting for timezone displays
  • Added comprehensive test coverage for all new functionality (28 tests passing)
  • Updated documentation in README.md with parameter descriptions and usage examples

Backward Compatibility

All existing workflows will continue to work without any changes, as the new parameters are optional and default to the current behavior.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copilot AI and others added 2 commits September 12, 2025 13:23
Co-authored-by: bmuenzenmeyer <298435+bmuenzenmeyer@users.noreply.github.com>
Co-authored-by: bmuenzenmeyer <298435+bmuenzenmeyer@users.noreply.github.com>
Copilot AI changed the title [WIP] could you propose a PR for this issue? Add customizable date and time formats (fixes #25) Sep 12, 2025
Copilot AI requested a review from bmuenzenmeyer September 12, 2025 13:30
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.

3 participants