Lively Kernel canvas
* MIT license
*
* Includes enhancements by Scott Trenda
* and Kris Kowal
*
* Accepts a date, a mask, or a date and a mask.
* Returns a formatted version of the given date.]]> 99 ? Math.round(L / 10) : L),
]]> 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4),
S: ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10]
};
return mask.replace(token, function ($0) {
return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1);
});
};
}();
// Some common format strings
dateFormat.masks = {
"default": "ddd mmm dd yyyy HH:MM:ss",
shortDate: "m/d/yy",
mediumDate: "mmm d, yyyy",
longDate: "mmmm d, yyyy",
fullDate: "dddd, mmmm d, yyyy",
shortTime: "h:MM TT",
mediumTime: "h:MM:ss TT",
longTime: "h:MM:ss TT Z",
isoDate: "yyyy-mm-dd",
isoTime: "HH:MM:ss",
isoDateTime: "yyyy-mm-dd'T'HH:MM:ss",
isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
};
// Internationalization strings
dateFormat.i18n = {
dayNames: [
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
],
monthNames: [
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
]
};
// For convenience...
Date.prototype.format = function (mask, utc) {
return dateFormat(this, mask, utc);
};]]>
Draft-CodeDB@apps40true
savefalsenulltruenull
HowtouseCodeDBinthewebwerkstatt?Justrequireapps.CDBBrowser.Anddo:163
cdb=newCodeDBRepositoryBrowser();cdb.openIn(WorldMorph.current());1
connect(WorldMorph.prototype,'toolSubMenuItems',{extendToolMenu:function(menu){menu.splice(3,0,["CodeDBRepositoryBrowser",function(evt){varcdb=newCodeDBRepositoryBrowser();cdb.openIn(WorldMorph.current());}]);returnmenu;}},'extendToolMenu');8
Wikicontroltruetrue
-----falsetruefalsetrue0false
1falsetruefalsetrue0
statusmsg:serializing....falsetruefalsetrue0
problemstoparsehttp://www.lively-kernel.org/repository/webwerkstatt/marko/DraftCodeDB.xhtmlfalsetruefalsetrue0
extendForSerialization[objectSVGDefsElement]falsetruefalsetrue0800
-1nullnulltrue0falsetruetrue
false10.11
true
false
nullfalse
nullfalse
nullfalse
nullfalsetruefalse
true
[1,2,3,4,5].splice(truetrue100truefalse
true5011false
nullfalsetruenull
Consolefalsenulltruefalse
false
false
falsenullfalsefalsenullnullnullnullfalse
null224