Getting human readable relative times and dates from a unix timestamp?

前端 未结 6 469
挽巷
挽巷 2021-01-14 00:32

Starting with a unix timestamp like 1290529723, how would I (assuming gmt) get the information on whether it is:

  • today (if so, what time)

  • i

6条回答
  •  余生分开走
    2021-01-14 01:04

    I personally like the https://github.com/kevinlawler/NSDate-TimeAgo library on github. It only has two files and it's very simple to use. It also has localization if you want!

提交回复
热议问题