I have a bookmarklet I use to check daily log files. However the bookmarklet I use only delivers the month and day in single digits, however the log files use double digits.
For example my bookmarklet delivers: http://url/log/2009-5-4_localcontrol-story.log, while the log file actually lives at: http://url/log/2009-05-04_localcontrol-story.log
Below is my current code:
javascript:d=new%20Date();window.open("http://url/log/"+d.getFullYear()+"-"+(d.getMonth()+1)+"-"+(d.getDate())+"_localcontrol-story.log",%20"_self");
Can you tell me an adaptation to this so I get my month and date in 2 digit format with the leading zero if necessary?