Answers for "show date time in swift ui"

3

swift get current time

let date = Date()
let calendar = Calendar.current
let hour = calendar.component(.hour, from: date)
let minutes = calendar.component(.minute, from: date)
Posted by: Guest on February-24-2020
2

How to create a Swift Date object

let currentDateTime = Date()
Posted by: Guest on March-20-2020

Code answers related to "Swift"

Browse Popular Code Answers by Language