Skip to content

Switched to NSDateComponents to create the date "short string" - #1428

Merged
astralbodies merged 2 commits into
developfrom
issue/583-date-shortstring-i18n
Mar 20, 2014
Merged

Switched to NSDateComponents to create the date "short string"#1428
astralbodies merged 2 commits into
developfrom
issue/583-date-shortstring-i18n

Conversation

@astralbodies

Copy link
Copy Markdown
Contributor

Fixes #583

This change also allows for localization of the units of time single characters. NSDateComponents seems to perform well enough during scrolling - CALayer stuff swamped the CPU comparatively during instrumentation.

This change also allows for localization of the units of time single characters.  NSDateComponents seems to perform well enough during scrolling - CALayer stuff swamped the CPU comparatively during instrumentation.
@astralbodies astralbodies added this to the 4.0.1 milestone Mar 19, 2014
@sendhil

sendhil commented Mar 20, 2014

Copy link
Copy Markdown
Contributor

One question for internationalization, do all units always come after the number, i.e. this line here - https://github.com/wordpress-mobile/WordPress-iOS/pull/1428/files#diff-e87b0114f8756216b42fb7660042bceeR22

Besides that, :shipit:

@astralbodies

Copy link
Copy Markdown
Contributor Author

Good point @sendhil - I'm going to dig through WP.com and see where those strings are created for the Reader.

@astralbodies

Copy link
Copy Markdown
Contributor Author

Looks like Reader is using Moment.js for it's transformation of time duration into a localized string.

http://momentjs.com/docs/#/displaying/fromnow/

@astralbodies

Copy link
Copy Markdown
Contributor Author

Just updated the localized strings so the order of the parameters is able to be changed. Thanks @sendhil!

astralbodies added a commit that referenced this pull request Mar 20, 2014
…ring-i18n

Switched to NSDateComponents to create the date "short string"
@astralbodies
astralbodies merged commit 61c6f8d into develop Mar 20, 2014
@astralbodies
astralbodies deleted the issue/583-date-shortstring-i18n branch March 20, 2014 12:53
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

Successfully merging this pull request may close these issues.

Localize shortened time/date format

2 participants