SwiftMoment icon indicating copy to clipboard operation
SwiftMoment copied to clipboard

`fromNow()` not returning localized string

Open samwize opened this issue 7 years ago • 1 comments

Detailed Description

Using fromNow() did not return the localized version for "%d days ago" and others.

The string format used in fromNow() is %%1.0f %@days ago, but in the strings files all uses %d and not %f, therefore it never get matched.

Context

Seems like a broken change.

Possible Implementation

Change the format to %d days ago, and use value as Int.

Your Environment

  • Version used: 0.7.0
  • Operating System and version: Mac 10.12.3
  • Link to your project: -

samwize avatar Mar 15 '17 01:03 samwize

In master this is working correctly using %d. Please merge so that the current pod version 0.7 can work.

samwize avatar Mar 15 '17 02:03 samwize