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

Swift: YLMoment(dateAsString: <#String!#>, format: <#String!#>) defaults to non-english even though locale is English #18

Open
deanq opened this issue Sep 17, 2014 · 4 comments

Comments

@deanq
Copy link

deanq commented Sep 17, 2014

This only occurs when it's less than a minute. It looks like "a few seconds ago" and "n seconds" is localized by a different value (dutch or swedish?). I'm not sure what language that is.

@yannickl
Copy link
Owner

Can you give me more detail on your project configuration? It happens with Xcode 6, iOS 8?
Have you another localized files (may be from another project) with the same keys?

I'll not be available this w-e, but I'll check that later.

@deanq
Copy link
Author

deanq commented Sep 19, 2014

Sorry. Xcode 6 latest, any iOS simulator (7.1 and 8.0). No localization yet. Also, dateAsString doesn't work when I have a different timezone like "2014-09-19T13:00:00-0700" but if I use UTC, then it works.

@yannickl
Copy link
Owner

Sorry for the late, but after many tests with Xcode 6.0.1 and 6.1 and for iOS 7 or over I noticed no issue. Have you some project tests or code sample to reproduce the problem?

@osrl
Copy link

osrl commented Dec 30, 2014

I got the same error with swift. Or something with iOS 8.1 simulator, or XCode 6. Even if the current locale is en_US bundle is dutch.
Here is the code:

let moment = YLMoment(dateAsString: 2014-12-29T18:36:58.242Z, format: "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")            
println(moment.fromNow())`

It prints vor 18 Stunden.
When I set the moment.locale it works ok.

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

3 participants