Hello all,
conerning the first error message "TypeError: 'undefined' is not a function" I got that, too in iWeb (could see in Console) and in Safari.
Investigating for a while in file Scripts/iWebBlog.js I found the reason for that behaviour:
beginning at line 168 in that file there starts a big function block beginning with:
var formatConversion={"y2":function(d,localizer){return("0"+d.getFullYear()).slice(-2);},
"y4":function(d,localizer){return("0000"+d.getFullYear()).slice(-4);},
"M4":function(d,localizer){return Date.fullMonthName(d.getMonth(),localizer);},
"M3":function(d,localizer){return Date.abbreviatedMonthName(d.getMonth(),localizer);},
"M2":function(d,localizer){return("0"+(d.getMonth()+1)).slice(-2);},
"M1":function(d,localizer){return String(d.getMonth()+1);},
"d2":function(d,localizer){return("0"+d.getDate()).slice(-2);},
"d1":function(d,localizer){return d.getDate();},
....
That function block is called a few lines later by
Date.prototype.stringWithICUDateFormat=function(format,localizer) ...
which contains a call to the above big function block in this manner:
{if(formatCode.length>0)
{var formatKey=formatCode+String(formatCount);try
{outFormat+=formatConversion[formatKey](this,localizer);}
catch(e)
{print(e);return"";}
...
Here we are: the underlined print(e) stmt prints out the error message which indeed is an exception message.
So why do we get an exception? The reason for this is that the function formatConversion is called with the formatCode "y1" which is not reflected in its big block (it begins with "y2").
To get rid of the exception I simply inserted the following stmt at the beginning of the big block:
var formatConversion={"y1":function(d,localizer){return d.getFullYear();},
"y2":function(d,localizer){return("0"+d.getFullYear()).slice(-2);},
...
That's all :-)
Hope I could help you.