iOS - Friendly NSDate format

前端 未结 9 2181
伪装坚强ぢ
伪装坚强ぢ 2021-02-04 13:31

I need to display the date of posts in my app to the user, right now I do it in this format: \"Fri, 25 May\". How would I format an NSDate to read something like \"2 hours ago\"

9条回答
  •  囚心锁ツ
    2021-02-04 14:28

    Take a look at FormaterKit https://github.com/mattt/FormatterKit

    Created by mattt who also created AFNetworking.

提交回复
热议问题