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

🔞 Update "short" demo survey so people born in 2006 can take it #1131

Merged
merged 1 commit into from
Mar 4, 2024

Commits on Feb 21, 2024

  1. update "short" demo survey so people born in 2006 can take it

    The short version of the demographics survey asks for year of birth and we restrict the valid range of responses so as to not allow participants younger than 18.
    Last year when I uploaded this, I wrote in 2005 as the upper limit. But theoretically, people born in 2006 can now participate in those studies.
    
    I found a more generic solution using the ODK forms constraint syntax and some built-in functions they have:
    `. > 1900 and . + 18 <= format-date(today(), '%Y')`
    
    So now we won't have to update this every year; it actually takes into account the current year when validating the form.
    JGreenlee committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    9be27b1 View commit details
    Browse the repository at this point in the history