[SOLVED] HTML Form Entry - Date computations

I am trying to carry out a very simple date computation, basically to give me yesterday’s date from a velocity date variable

Is there any simple inbuilt way to do this? I see the Velocity Guide calls for falling down into Java for this

@mseaton @mogoodrich Any advice on how to approach it

I’m not a Velocity expert, but I don’t know of a way to do this. The most straightforward thing to do would be to just add more functions to the Velocity Context in the HFE module to provide the capabilities that you need.

1 Like

@mseaton Thanks, looks like that may be the best way forward - will use that approach

Opened Enhancement [HTML-797] Add Velocity Functions to Handle date processing - OpenMRS Issues

Added a PR HTML-797 Add Velocity date addition and utility functions by ssmusoke · Pull Request #252 · openmrs/openmrs-module-htmlformentry · GitHub if anyone can review

The documentation page has been updated


1 Like