Skip to content

Support DateTime specific variables #19

@cmuench

Description

@cmuench

Extend the variables that can be used in the Custom Payload with DateTime specific variables.

I have refined the requirements for the new DateTime variables. Here is a detailed proposal:

New DateTime Variables

To provide more flexibility, I suggest adding a set of new variables prefixed with now. for UTC time and now.local. for local time.

Variable Name Description Example Value (at 2025-08-07T10:20:30.123Z)
{{now.iso}} Current date and time in ISO 8601 format (UTC). 2025-08-07T10:20:30.123Z
{{now.date}} Current date in YYYY-MM-DD format (UTC). 2025-08-07
{{now.time}} Current time in HH:mm:ss format (UTC). 10:20:30
{{now.unix}} Current Unix timestamp in seconds (UTC). 1754590830
{{now.unix_ms}} Current Unix timestamp in milliseconds (UTC). 1754590830123
{{now.year}} Current year (UTC). 2025
{{now.month}} Current month (1-12) (UTC). 8
{{now.day}} Current day of the month (1-31) (UTC). 7
{{now.hour}} Current hour (0-23) (UTC). 10
{{now.minute}} Current minute (0-59) (UTC). 20
{{now.second}} Current second (0-59) (UTC). 30
{{now.millisecond}} Current millisecond (0-999) (UTC). 123
{{now.local.iso}} Current date and time in ISO 8601 format (local). 2025-08-07T12:20:30.123+02:00
{{now.local.date}} Current date in YYYY-MM-DD format (local). 2025-08-07
{{now.local.time}} Current time in HH:mm:ss format (local). 12:20:30

Backward Compatibility

For backward compatibility, the existing {{triggeredAt}} variable will be kept as an alias for {{now.iso}}.

This set of variables should cover most use cases for adding dynamic DateTime information to the custom payload. Let me know if you have any feedback on this proposal.

Plan

  • Implement the new DateTime variables in popup/popup.js.
  • Update the documentation to include the new variables.
  • Add tests for the new variables.
  • Create a pull request with the changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestjulesDelegate task to Google Jules Coding Agent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions