Cocoa中是否有一些功能可以用自然语言显示时间间隔? [英] Is there some functionality in Cocoa to display time intervals in natural language?

查看:126
本文介绍了Cocoa中是否有一些功能可以用自然语言显示时间间隔?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找的是一个可以用自然语言显示时间间隔的Cocoa(或第三方)类,例如:

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


  • 10秒钟前

  • 1小时前

  • 2天前

推荐答案

我最初指出的一个似乎不再有了,但指出有 NSDate-TimeAgo ,我没有尝试,但对我看起来不错。

The one I've originally pointed to does not seem to be there anymore but as pointed out there is NSDate-TimeAgo, I haven't tried it but looks good to me.

编辑:现有代码

这篇关于Cocoa中是否有一些功能可以用自然语言显示时间间隔?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆