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

Unnecessary strings are printed in Xcode console #269

Closed
digidhamu opened this issue Oct 1, 2016 · 1 comment
Closed

Unnecessary strings are printed in Xcode console #269

digidhamu opened this issue Oct 1, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@digidhamu
Copy link

digidhamu commented Oct 1, 2016

I can see unnecessary strings minute and second are printed in the Xcode console when I invoke below function. Please advise.

Please note that SwiftDate version is 4.0.2

func secondsToTimeString(_ seconds: TimeInterval) -> String {
  let refDate = Date()
  let toDate = refDate + Int(seconds).seconds

  do {
    return try (refDate - toDate).string(unitStyle: .positional, max: 4, zero: nil, separator: ":", locale: nil)!
  } catch {
    return ""
  }
}
@malcommac malcommac added this to the 4.0.3 milestone Oct 1, 2016
@malcommac malcommac added the bug label Oct 1, 2016
@malcommac malcommac self-assigned this Oct 1, 2016
malcommac added a commit that referenced this issue Oct 1, 2016
Unnecessary strings are printed in Xcode console when printing timeComponents() [#269]
@malcommac
Copy link
Owner

Thank you. It was fixed and will be part of the upcoming 4.0.3 release (see 2118282)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants