Sometimes blues hacks

[philiptellis] I've been a programmer almost all my life. My code is scattered all over the place. Some of it is linked from here.

Featured hack: strftime.js

Detailed explanation about strftime.js

In the field below, enter any of strftime's supported format specifiers. The whole list is available with the PHP documentation for strftime. The result will be the current date using that format printed out in English, French and German.


Natural language:
%A, %d %B
ISO 8601:
%c, %x, %r


strftime in Javascript

As a follow-up to my last post about Javascript date functions, I went ahead and implemented strftime for javascript.

Have a look at the demo at the link above, and download the code: strftime.js. It's distributed under a BSD license, so use it and give me feedback. Post comments here for now.The code is documented using doxygen style comments.

You should also check out Stoyan's time input library that lets you do the equivalent of php's strtotime function.

Update: This code is now part of the YUI library and all further development will be done there.


  • lifebook
    A book style aggregator of my life with page flipping.
  • footsteppr
    Find travel co-incidences through geo-tagged flickr photos.
  • Detailed explanation about
    Fetch favicons for all feeds that go into a planet.
  • mkdrag.js Detailed explanation about mkdrag.js
    Script to make all divs on a page draggable.

Opensource stuff

  • Ayttm
    A unified instant messenger client.
  • libyahoo2
    C library for the Yahoo! Messenger protocol.
    Java port of the HTML::Template perl library.
  • httptype
    Figure out the web server running on a host or list of hosts.
  • tictactoe
    An implementation of the simple game that uses current board analysis rather than a lookahead tree to determine the best move.