像timeago,但在未来 [英] Like timeago, but in the future

查看:73
本文介绍了像timeago,但在未来的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个名为 timeago 的酷炫jQuery插件,它将过去的时间转换为人类可读的格式。

There is this cool jQuery plugin called timeago which converts time from the past into a human readable format.

我希望将来有类似的事情。 (我正在制作电视节目安排程序。)

I would like a similar thing for the future. (I am working on a TV programme scheduler.)

推荐答案

引用来自文档(实际上是主页):

Quote from the documentation (home page in fact):


要支持将来的时间戳,请使用allowFuture设置:

To support timestamps in the future, use the allowFuture setting:

jQuery.timeago.settings.allowFuture = true;

现场演示

这篇关于像timeago,但在未来的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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