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

A month is not 30 weeks (LOL) #47

Closed
rutvora opened this issue Aug 9, 2024 · 2 comments · Fixed by #49
Closed

A month is not 30 weeks (LOL) #47

rutvora opened this issue Aug 9, 2024 · 2 comments · Fixed by #49

Comments

@rutvora
Copy link
Contributor

rutvora commented Aug 9, 2024

Simple bug in src/common.js

Second last line in this snippet

let expirationSeconds = parseFloat(expirationStr)
  const lastChar = expirationStr[expirationStr.length - 1]
  if (lastChar === 'm') expirationSeconds *= 60
  else if (lastChar === 'h') expirationSeconds *= 3600
  else if (lastChar === 'd') expirationSeconds *= 3600 * 24
  else if (lastChar === 'w') expirationSeconds *= 3600 * 24 * 7
  else if (lastChar === 'M') expirationSeconds *= 3600 * 24 * 7 * 30
  return expirationSeconds
@Master-Hash
Copy link

It's really funny, but I thought you mean "A month is not 30 weeks"?

@rutvora
Copy link
Contributor Author

rutvora commented Aug 9, 2024

Yep. Just realised the typo here too. haha
Gonna fix that

@rutvora rutvora changed the title A month is not 7 weeks (LOL) A month is not 30 weeks (LOL) Aug 9, 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
2 participants