Javascript Date formatting

10.9.10

Today I was working on my TBtracer plugin, which is humming along nicely BTW, some of the new features recently included  are:

  • full response for HTTP requests in log,
  • CSS rules for both HTTP head and body,
  • better organization of high-resolution timestamps in conjunction with HTTP lines (timestamps for both request and response are recorded at the exact moment the notification first hits my code),
  • able to select which columns are shown in log,
  • custom date format string for timestamps.

While working on that, I needed date formatting for the last bullet point which is not standard in javascript. A quick google search reveals lots of hits and I quickly settled on 3 proimising looking candidates (meaning the code looked clean :). So let’s take a look.
Read the rest of this entry »