-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add WEEKNUM function #5
Comments
In which Files of rapidPro can i add the function WEEKNUM?? |
@rowanseymour thank you very much. I will add it with java implementation |
@rowanseymour I don't find these files on rapidPro. I must install them with command ? |
This is separate library which we import into RapidPro. Remember you need to implement it in both Java and Python - then add tests to show that they are consistent with each other, and consistent with Excel itself. |
OK. I install openjdk and now di i put ExcelFunctions.java in rapidpro/expressions/functions/ folder? Also if i add new function i can just call it with @(NEW_FUNCTION()) ? |
Look at the existing functions in ExcelFunctions.java and follow the same pattern. If you create a method called |
I don't find ExcelFunctions.java in my RapidPro. I just find excels.py in /env/lib/python2.7/site-packages/expressions/functions folder. |
It's not in RapidPro - it's in this repo that this issue belongs to. This is a project which contains the Java implementation of the RapidPro expression engine (used by Surveyor) and the Python implementation (used by the RapidPro Django app) |
Thank you. I finally add WEEKNUM function but in python. def weeknum(ctx, date): |
Hello @rowanseymour. The function run in the simulator without error but if i test the flow with a phone i get @(WEEKNUM(TODAY())) instead of 4 for example |
How can i test my need function just added in my copy of expressions lib ? |
See https://support.office.com/en-us/article/WEEKNUM-function-e5c43a03-b4ab-426c-b411-b18c13c75340
The text was updated successfully, but these errors were encountered: