.
echo date('r',strtotime("16 Dec, 2010")); //Tue, 16 Dec 2008 20:10:00 +0530
echo date('r',strtotime("16 Dec 2010")); //Sat, 16 Jan 2010 00:00:00 +0530
That's just wrong... Either it should fail or it should parse correctly. Do you know any robust natural language date/time parser in php? How do you parse natural language date ti...
I'd like a way to show natural times for dated items in Python. Similar to how Twitter will show a message from "a moment ago", "a few minutes ago", "two hours ago", "three days ago", etc.
Django 1.0 has a "humanize" method in django.contrib. I'm not using the Django framework, and even if I were, it's more limited than what I'd like.
...
It seems that Time.parse will treat 9/12/2010 as December 9, 2010:
irb(main):012:0> RUBY_VERSION
=> "1.9.2"
irb(main):013:0> Time.parse('9/12/2010')
=> 2010-12-09 00:00:00 -0800
irb(main):014:0> Time.parse('9/12/2010 7:10pm')
=> 2010-12-09 19:10:00 -0800
I can use Regex to mess with the order and parse accordingly, but is there a di...