Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatter locale #2

Closed
dbmrq opened this issue Jan 13, 2017 · 2 comments
Closed

Formatter locale #2

dbmrq opened this issue Jan 13, 2017 · 2 comments

Comments

@dbmrq
Copy link
Contributor

dbmrq commented Jan 13, 2017

I didn't make a PR already because I don't know if there's a reason for this, but wouldn't it be better if the shortDateFormatter et al. used Locale.autoupdatingCurrent?

E.g.:

public static var shortDateFormatter: DateFormatter = {
    $0.locale = Locale.autoupdatingCurrent
    $0.dateStyle = .short; return $0
}(DateFormatter())
@erica
Copy link
Owner

erica commented Jan 13, 2017 via email

@erica
Copy link
Owner

erica commented May 26, 2017

    /// Thanks, Daniel Marques, https://github.com/erica/SwiftDates/issues/2
    public static var iso8601Formatter: ISO8601DateFormatter = {
        $0.timeZone = TimeZone.autoupdatingCurrent
        return $0 }(ISO8601DateFormatter())

@erica erica closed this as completed May 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants