Skip to content

Instantly share code, notes, and snippets.

@mdk-aza
Last active July 13, 2020 14:35
Show Gist options
  • Save mdk-aza/b51048c94197e5940cb11149f9bb687f to your computer and use it in GitHub Desktop.
Save mdk-aza/b51048c94197e5940cb11149f9bb687f to your computer and use it in GitHub Desktop.
SwiftDateを使って分、秒などを簡単に切り捨てる。
///6.0.2を使用して動作確認済み
///https://github.com/malcommac/SwiftDate/releases/tag/6.0.2
import SwiftDate
let dateTruncated = Date().dateTruncated([.second])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment