This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let dateformatter = DateFormatter() | |
dateformatter.locale = Locale(identifier: "ko_KR") | |
dateformatter.timeZone = TimeZone(identifier: "KST") | |
dateformatter.dateFormat = "yyyy-MMMM-dd E" | |
print(dateformatter.string(from: Date())) //2021-4월-10 토 | |
dateformatter.dateFormat = "yyyy-MMMM-dd E a h:m:s" | |
dateformatter.amSymbol = "오전" | |
dateformatter.pmSymbol = "오후" | |
print(dateformatter.string(from: Date())) // 2021-4월-10 토 오후 1:54:20 |
인척하는 github gist 사용 연습
728x90
'iOS' 카테고리의 다른 글
[또러블슈팅] CloudKit + CoreData 을 사용하는 App에서 iCloud 동기화가 안되는 문제 (0) | 2024.12.12 |
---|---|
[또러블슈팅] double-quoted include "헤더파일명" in framework header, expected angle-bracketed instead ERROR (0) | 2024.12.10 |
[iOS] CocoaPods 사용법 (0) | 2021.04.07 |
[iOS] Core data copy(backup, archive) & restore with iCloud (0) | 2021.04.02 |
[iOS] UICollectionViewDelegateFlowLayout 적용 (0) | 2021.03.13 |