This message was deleted.
# help
s
This message was deleted.
t
You can use the
concat
helper to build the offset string e.g.
Copy code
{{now offset=(concat request.query.offsetDays.0 ' days)}}
r
great thanks. I will try to use this.
What is the right ref doc for such functions so that I don't have to borrow your valuable time for these and other helper functions. Is it handlebar js ?
Copy code
{{now offset=(concat request.query.offsetDays.0 ' days)}}
the above syntax seems to have some issues
Copy code
12:30: found: 'days'', expected: ')'
t
This is the implementation we use: https://github.com/jknack/handlebars.java
Apologies @Rahul Agrawal, I’ve misled you here. Seems we’re not loading the concat helper at the moment so it’s not available. You can use
assign
for the same purpose, however:
Copy code
{{#assign 'offset'}}{{request.query.offsetDays}} days{{/assign}}
{{now offset=offset}}
👍 1
r
Thanks for the help with the above code. Don't worry , your did not mislead me . It was blessing in disguise. Forced me try other options and read more. the above expression seems a very elegant approach and will hep me for few other things also. Rarely seen the founders paying so much attention to each query from end users to help them. This is another thing to learn from you @Tom. 👏
t
No problem, and thanks for the kind feedback!
🙏 1