We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Repeatedly, the handling of time and date using nanoseconds has gotten people stumbling.
The situation could perhaps be improved if we had some rego-only helper methods? I'm imaging something like
days(n) = x { x := n * hours(24) } hours(n) = x { x := n * minutes(60) } minutes(n) = x { x := n * seconds(60) } seconds(n) = x { x := n * 1000000000 }
So that you could write time.now_ns() - time.days(1) etc.
time.now_ns() - time.days(1)
This would be similar to how golang does it in time's constants.
time
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Repeatedly, the handling of time and date using nanoseconds has gotten people stumbling.
The situation could perhaps be improved if we had some rego-only helper methods? I'm imaging something like
So that you could write
time.now_ns() - time.days(1)
etc.This would be similar to how golang does it in
time
's constants.The text was updated successfully, but these errors were encountered: