Skip to content

Increase precision of age around birthdate#19

Open
theycallmeswift wants to merge 1 commit intomaccman:masterfrom
theycallmeswift:master
Open

Increase precision of age around birthdate#19
theycallmeswift wants to merge 1 commit intomaccman:masterfrom
theycallmeswift:master

Conversation

@theycallmeswift
Copy link

The current formula for calculating age isn't accurate within ~24 hours of the birthday on some years because we're using a hardcoded value for milliseconds per year. This change calculates the year and decimal places separately to increase accuracy.

Changes:

  • Convert the dob to the current timezone when saving and loading
  • Calculate age in years by comparing days
  • Calculate age in MS as % of MS in current year

 - Convert the dob to the current timezone when saving and loading
 - Calculate age in years by comparing days
 - Calculate age in MS as % of MS in current year
@boyski33
Copy link

It would be great if this could be merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants