Gistlib Logo

gistlib

24 hours ago date in swift

main.swift
let currentDate = Date()
let twentyFourHoursAgo = Calendar.current.date(byAdding: .hour, value: -24, to: currentDate)
118 chars
3 lines

similar swift code snippets

%y-%m-%dt%h:%m:%s.%fz python to swift isoformatter in swift
get the start and end of today as an iso string in swift
can you convert %y-%m-%dt%h:%m:%s.%fz python to swift in swift
format a date in to the format month day, year hour:minute:second am/pm in swift
convert australian eastern daylight time to gmt in swift
convert new zealand time to gmt in swift
sort a list of people by name in swift
how do you determine if a string is a palindrome in swift
hello world in swift
protocol in swift

related categories

swift
datetime

gistlibby LogSnag