I needed to an implementation of sprintf() to use with strftime() but could not find one. So here is my implementation of sprintf() in javascript. It may have bugs or otherwise be incomplete but it's a pretty good start.
The following are just some tests for the library:
End of tests.
vsprintf.c of the linux kernel 2.6.5 source code
Copyright (C) 2009 Jonathan Buhacoff