Is there some functionality in Cocoa to display time intervals in natural language?

后端 未结 4 597
轻奢々
轻奢々 2021-01-15 16:53

What I am searching for is a Cocoa (or third party) class that can display time intervals in natural language, e.g.:

  • 10 seconds ago
  • 1 hour ago
4条回答
  •  余生分开走
    2021-01-15 17:38

    I can really recommend Mattt Thompson's TTTTimeIntervalFormatter - very clean, very functional (lots of other super useful bits and pieces in the same repo).

提交回复
热议问题