TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Datejs: A Truly Slick Date Script

11 点作者 shayan超过 17 年前

5 条评论

ratsbane超过 17 年前
This is rather slick. I've used Perl's Date::Manip. It would be nice to move that to the browser but Date::Manip still seems to do a better job. For instance, Date::Manip will resolve "First tue in nov" or "third wed in june" while datejs doesn't. The kiko date parser worked really well. I understand they wrote it themselves?<p><a href="http://search.cpan.org/~sbeck/Date-Manip-5.48/Manip.pod" rel="nofollow">http://search.cpan.org/~sbeck/Date-Manip-5.48/Manip.pod</a>
bootload超过 17 年前
Try <i>"next friday at 1700"</i> and you get <i>"Wednesday, November 30, 3707 0:00:00 AM"</i><p>So it fails a simple test (24hr clock). [0]<p>But it is a nice idea. You get real time feedback and so you can test if it works. Now would I use it for my blog engine? Maybe. Would I use the source? I looked at the code [1] and the structure looks good but I cannot read the code. It looks like it's all on one line and is not readable. What's the use if I can't enjoy reading it? It's free software, but I can't read it to fix it.<p>Dates and times are difficult. For a real alternative try ~ <a href="http://datetime.perl.org/?Modules" rel="nofollow">http://datetime.perl.org/?Modules</a><p>[0] <a href="http://flickr.com/photos/bootload/2070923712/" rel="nofollow">http://flickr.com/photos/bootload/2070923712/</a><p>[1] <a href="http://flickr.com/photos/bootload/2070134059/" rel="nofollow">http://flickr.com/photos/bootload/2070134059/</a><p>
评论 #84364 未加载
abstractbill超过 17 年前
<a href="http://abstractnonsense.com/datejs.png" rel="nofollow">http://abstractnonsense.com/datejs.png</a>
izak30超过 17 年前
I want to see this check the timezone of the client, and calculate other timezones (unix: PST: next tuesday + 5 years)?
edw519超过 17 年前
I typed "112807" (the most likely entry by my users) and it responded "No One's Home".<p>Handle the easy cases first; then get slick.<p>It should be able to handle any delimitter, even no delimitter at all.<p>
评论 #84242 未加载