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

Fixed the year calculation edge case. #31

Closed
wants to merge 1 commit into from

Conversation

ajayrwarrier
Copy link

Issue:
The nextBirthday variable is updated with currentYear +1 but the currentYear variable in itself is not updated. This will lead to an error in the output given by Alexa when the user's birthday is in the next year because the output is generated using year - currentYear.

Description of Change:
Created a new variable called nextYear. It is by default set to currentYear and incremented when a user's birthday exceeds the current time of the year. This nextYear variable is used for age calculation instead of the currentYear variable.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

The nextBirthday variable is updated with currentYear +1 but the currentYear variable in itself is not updated. This will lead to an error in the output given by Alexa when the user's birthday is in the next year because the output is generated using year - currentYear.
@ajayrwarrier ajayrwarrier closed this by deleting the head repository Sep 7, 2024
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.

1 participant