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

Bug In Test Dates Helper #77

Open
Mark1626 opened this issue Oct 17, 2018 · 0 comments
Open

Bug In Test Dates Helper #77

Mark1626 opened this issue Oct 17, 2018 · 0 comments

Comments

@Mark1626
Copy link

Mark1626 commented Oct 17, 2018

Bug Report : Test Dates Helper

Methods getHour, getMinutes returning incorrect values

To Reproduce

  getHour(0) // Result does not satisfy 24 hour format
  getHour(11) // Result does not have proper formatting
  getHour(10) // Result does not have proper formatting
  getMinutes(10)

Expected behavior

getHour
For 00:00 the equivalent 12 hour format is 12:00
In the other case formatting is done wrong when hour is 10, 11

if (hour < 12) { // Problematic code line 58 dates-helper.js
  return `0${hour}`
}

getMinutes
Supposed to return string, when value is greater than 10
it returns Number

Actual Behavior

  getHour(0) === '0'
  getHour(11) === '011'
  getHour(10) === '010'
  getMinutes(11) === 11

@maximodeleon

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

No branches or pull requests

1 participant