Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Introdouce date-time and or parse_timestamp (to epoch) function (parser). #521

Open
justinmburrous opened this issue Jun 14, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@justinmburrous
Copy link

Is your feature request related to a problem? Please describe.

We would like to have the ability to parse date-time values to epoch for comparison purposes. For example...

  • Parse date-time values out of date-time fields as numbers.
  • Validate that date-time values for a schedule feature in a service are x units in the future.
  • Validate misc. properties on resources are at some value IF a particular resource was updated after x update-time.
  • Filter versions of certain resources (where versions are represented as yyyy-mm-dd vs "v1", etc).
  • Parse date-times out of fields such as Tags and or potentially Descriptions of certain resources if used in this manner.
  • Validate Template parameters if used in automation and injected by automation.

Describe the solution you'd like

It would be be nice if there were a way to parse timestamps (represented as strings) in templates now into values we would use. The simplest approach would be to introduce a parse_epoch or parse_iso8601_epoch function to the existing set of functions which would enable simple numbers comparisons at the very least.

Describe alternatives you've considered

In theory all sorts of date-time functions could be supported within Guard, however a simple parser for epoch time would be a reasonable start.

Additional context

N/A for the moment.

@justinmburrous justinmburrous added the enhancement New feature or request label Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
1 participant