cowinapi / developer.cowin

This group is created to facilitate technical and integration discussions related to cowin platform. API related contents can be obtained at API setu portal https://apisetu.gov.in/public/marketplace/api/cowin
115 stars 30 forks source link

Please correct your age calculation algorithm #468

Open yashN7 opened 3 years ago

yashN7 commented 3 years ago

Right now the age is being calculated by just subtracting the current year and year of birth, this is giving 1 year increased age for users whose birthday hasn't come yet this year. For example, a person born on July 15, 1998 will have their age written as 23 (2021-1998=23) but in reality, the person is 22 years old as July 15 hasn't come yet. I can help you with correcting this age calculation algorithm if you want.

big89 commented 3 years ago

I think if Co-Win portal is asking only Year from date of birth, not complete date of birth, then may be they are using this logic to calculate approximate (near about) not exact age. Else, I don't think their developer didn't ever know the logic yo are talking about.

Correct if you are talking about something else, they might look into that.

Thanks, Logicmaker