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

Fix expiration date conversion when the day is zero #6

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

hprange
Copy link

@hprange hprange commented Sep 11, 2018

Many manufacturers inform just the month and the year of the expiration date in their barcodes. If that happens, the day usually comes as zero. In such scenario, the date parsing code ends up converting the expiration date to the last day of the previous month. E.g., a barcode containing 190700 in the date position becomes Jun 30, 2019. It should be converted to Jul 31, 2019, instead.

The build is configured to verify the code using JSHint, uglify the code and run tests in the spec folder.
Many manufacturers inform just the month and the year of the expiration date in their barcodes. If that happens, the day usually comes as zero. In such scenario, the date parsing code ends up converting the expiration date to the last day of the previous month. E.g., a barcode contaning 190700 in the date position becomes Jun 30, 2019. It should be converted to Jul 31, 2019, instead.
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