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

Introduce Catmandus less_than and greater_than conditionals #389

Open
TobiasNx opened this issue Dec 10, 2024 · 0 comments
Open

Introduce Catmandus less_than and greater_than conditionals #389

TobiasNx opened this issue Dec 10, 2024 · 0 comments

Comments

@TobiasNx
Copy link
Collaborator

TobiasNx commented Dec 10, 2024

Introduce greater_than and less_than conditionals from Catmandu.
Requested by TU D for comparing numbers and years. This seems to be a good feature and already supported by catmandu.

from Catmandu:

# greater_than(X,Y) is true when X > Y
if greater_than('year','2018')
 add_field('my.funny.title','true')
end
# greater_than on arrays checks if all values are X > Y
if greater_than('years.*','2018')
  add_field('my.funny.title','true')
end

and

# less_than(X,Y) is true when X < Y
if less_than('year','2018')
 add_field('my.funny.title','true')
end
# less_than on arrays checks if all values are X < Y
if less_than('years.*','2018')
  add_field('my.funny.title','true')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Ready
Development

No branches or pull requests

2 participants