TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Datejs: A Truly Slick Date Script

11 pointsby shayanover 17 years ago

5 comments

ratsbaneover 17 years ago
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>
bootloadover 17 years ago
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 未加载
abstractbillover 17 years ago
<a href="http://abstractnonsense.com/datejs.png" rel="nofollow">http://abstractnonsense.com/datejs.png</a>
izak30over 17 years ago
I want to see this check the timezone of the client, and calculate other timezones (unix: PST: next tuesday + 5 years)?
edw519over 17 years ago
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 未加载