Dodgy PHP Relative dates written 5 years ago
I recently changed the way that relative dates are confabulated on the site. Now it’s much nicer, take a look below if you want to know how it’s done.
And If there’s any php buffs reading that could spot any glaring errors I’d be grateful ..
Comments 7 comments made
-
Quote this comment as a reply“”
saysHow did you make that link open the page of code for viewing and not parsing? is it all in: echo ‘<…>’; ?
-
Quote this comment as a reply“”
saysNope, just use the following:
and it produces the pretty coloured syntax, to test this you can just look at the source and that will show you the php sans colours.
See also php highlight_string manual.
-
Quote this comment as a reply“”
says-
Quote this comment as a reply“”
saysYes, would you like a cookie?
Although you’ve mastered the art of post-it notes, you don’t seem able to remember your own website URL.
This worries me.
-
Quote this comment as a reply“”
saysis this working?
-
Quote this comment as a reply“”
saysYes, it is
-
Quote this comment as a reply“”
saysVery nice :D