Google Blogoscoped

Forum

Pixel Group Movie  (View post)

jon [PersonRank 0]

Saturday, December 10, 2005
14 years ago

cool... i love that thing
btw: check out snap.com (it's new)
and a request: is there anyway i could get the source code (probably just the function) for the thing that says: "2 hours ago or 5 days ago".i have tried to find something like it but i could never find one like this. it is done with php? if it is can you show us how you did that? (or atleast a hint on how it works)
thanks

Philipp Lenssen [PersonRank 10]

14 years ago #

Jon, sure. Please note that the original function uses some more code for content negotiation (it outputs in either German or English, depending on the browser setting) which I stripped for you. It's untested in this version but should work.
blogoscoped.com/files/how-long ...

jon [PersonRank 0]

14 years ago #

holy moly.
thanks a lot.
just a little note for other people who might get interrested: there is a pretence on line 41 (probably a typo) which shouldn't be there.
thanks agian

This thread is locked as it's old... but you can create a new thread in the forum. 

Forum home

Advertisement

 
Blog  |  Forum     more >> Archive | Feed | Google's blogs | About
Advertisement

 

This site unofficially covers Google™ and more with some rights reserved. Join our forum!