opensrp / fhircore

FHIR Core / OpenSRP 2 is a Kotlin application for delivering offline-capable, mobile-first healthcare project implementations from local community to national and international scale using FHIR and WHO Smart Guidelines on Android.
https://smartregister.org
Apache License 2.0
50 stars 39 forks source link

Leap Year Not Considered in Patient Age Registration #3156

Open Mstjamush opened 3 months ago

Mstjamush commented 3 months ago

Describe the bug In the patient age registration calendar within the application, leap years are not being accounted for when calculating the age of patients.After registering a patient in a leap year their age is shown as a day short and sometimes a month short.

To Reproduce Steps to reproduce the behavior:

  1. Login to any of the apps
  2. Add a patient enter any age (Click Date of Birth unknown and enter age in years)
  3. Save

Expected behavior Age displayed should be equal to that user had input in the form

https://github.com/opensrp/fhircore/assets/29072646/455da3f1-9a94-4cf8-8882-593d32e48788

pld commented 3 months ago

What was the content you used for this? I think this should be an issue with the content and not with the product, but I'm not certain

pld commented 3 months ago

also, great catch!