Mercurial > public > lazybear
comparison LazyBear/Global functions/ConvertEpoch.swift @ 448:f71761f166f2
Handle when data is empty
author | Dennis Concepción Martín <dennisconcepcionmartin@gmail.com> |
---|---|
date | Wed, 23 Jun 2021 11:47:14 +0200 |
parents | c804ce7a1560 |
children | b560babcd5ed |
comparison
equal
deleted
inserted
replaced
447:8621ba6fd457 | 448:f71761f166f2 |
---|---|
15 | 15 |
16 // TimeInterval() function must be in seconds, not in miliseconds | 16 // TimeInterval() function must be in seconds, not in miliseconds |
17 let convertedDate = Date(timeIntervalSince1970: TimeInterval(miliseconds/1000)) | 17 let convertedDate = Date(timeIntervalSince1970: TimeInterval(miliseconds/1000)) |
18 | 18 |
19 let formatter = DateComponentsFormatter() | 19 let formatter = DateComponentsFormatter() |
20 formatter.unitsStyle = .abbreviated | 20 formatter.unitsStyle = .short |
21 | 21 |
22 let dateFormatter = DateFormatter() | 22 let dateFormatter = DateFormatter() |
23 dateFormatter.dateStyle = .medium | 23 dateFormatter.dateStyle = .medium |
24 | 24 |
25 var humanDate = String() | 25 var humanDate = String() |