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

timeFns.until() cannot return lower units #85

Open
kolton-musgrove opened this issue Jan 26, 2022 · 0 comments
Open

timeFns.until() cannot return lower units #85

kolton-musgrove opened this issue Jan 26, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@kolton-musgrove
Copy link
Collaborator

const time1 = timeFns.from('10:23:15')
const time2 = timeFns.from('17:15:57')
it('can return lower units', () => {
  assert.equal(timeFns.until(time1, time2, { largestUnit: 'minutes' }), 'PT412M42S')
  assert.equal(timeFns.until(time1, time2, { largestUnit: 'seconds' }), 'PT24762S')
})

Test 1:

  • actual: 'PT6H412M42S'
  • expected: 'PT412M42S'

Test 2:

  • actual: 'PT6H52M24762S'
  • expected: 'PT24762S'
@kolton-musgrove kolton-musgrove added the bug Something isn't working label Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant