Created
September 7, 2016 06:27
-
-
Save 7gano/28b99c91af0717bd4e5ea26c53e3f35e to your computer and use it in GitHub Desktop.
今は平成28年だゾ!
This file contains hidden or 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 japaneaseCalendar = Calendar(identifier: Calendar.Identifier.japanese) | |
var dateFormatter = DateFormatter() | |
dateFormatter.calendar = japaneaseCalendar | |
dateFormatter.dateFormat = "GGyy" | |
dateFormatter.locale = Locale(identifier: "ja_JP") | |
dateFormatter.string(from: Date()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment