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);
};]]>
Draft40true
savefalsenulltruenull
-----falsetruefalsetrue0
fontHelvetica40:spacewidth11from47xWidth18falsetruefalsetrue0
fitWidthfailureonTextMorph.getCharBoundsfalsetruefalsetrue0
worldis1:WorldMorph([[undefined,undefined,1805.300048828125,3500.199951171875]])falsetruefalsetrue0
startingWikiNavigatorfalsetruefalsetrue0
status207onPROPFINDhttp://www.lively-kernel.org/repository/webwerkstatt/projects/CodeDB/draft-deps.xhtmlfalsetruefalsetrue0
status207onPROPFINDhttp://www.lively-kernel.org/repository/webwerkstatt/projects/CodeDB/draft-deps.xhtmlfalsetruefalsetrue0
http://www.lively-kernel.org/repository/webwerkstatt/projects/CodeDB/../../anonymous_module_3loadedin240msfalsetruefalsetrue0
http://www.lively-kernel.org/repository/webwerkstatt/projects/CodeDB/../../anonymous_module_2loadedin1940msfalsetruefalsetrue0
loadingscripthttp://couchdb.lively-kernel.org/code_db/_design/raw_data/_list/javascript/for-module?module=HelloDBfalsetruefalsetrue0
statusmsg:ReferenceError:Can'tfindvariable:Foo1Line:21falsetruefalsetrue0
status:ReferenceError:Can'tfindvariable:Foo1falsetruefalsetrue0
fontHelvetica16:spacewidth4from18xWidth7falsetruefalsetrue0
http://couchdb.lively-kernel.org/code_db/_design/raw_data/_list/javascript/for-module?module=HelloDBloadedin1576msfalsetruefalsetrue0
statusmsg:TypeError:Resultofexpression'result'[undefined]isnotanobject.Line:275URL:Base.js2falsetruefalsetrue0
status:TypeError:Resultofexpression'result'[undefined]isnotanobject.falsetruefalsetrue0
loadingscripthttp://www.lively-kernel.org/repository/webwerkstatt/projects/CodeDB/../../Blablub.jsfalsetruefalsetrue0
inundefined:[objectEvent],codeundefinedfalsetruefalsetrue0
loadingscripthttp://couchdb.lively-kernel.org/code_db/_design/raw_data/_list/javascript/for-module?module=Blablubfalsetruefalsetrue0
Takethis,console!falsetruefalsetrue0
statusmsg:serializing....falsetruefalsetrue0
problemstoparsehttp://www.lively-kernel.org/repository/webwerkstatt/projects/CodeDB/draft-deps.xhtmlfalsetruefalsetrue0
extendForSerialization[objectSVGDefsElement]falsetruefalsetrue0972.0399880273437
37nulltrue0falsefalsenulltruetruefalse
false1truefalsenull
nullfalse
nullfalse
nullfalse
nullfalsefalsetruetruefalse
truetrue100truefalse
truefalsenull050
nullfalsetruenullfalse
Consolefalsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
Wikicontroltruetrue
//First,loadthismodulebyexecutingthisline.module('$code_db.HelloDB').load();//Second,executethispartafterloadingmodulewasfinished//Btw.Isthereabetterwaytowaitforamodulefinishloading?/*bar=newFoo1();bar.method10('Takethis,console!');//watchtheconsole!*/16truetruefalsefalsetruetruefalse
false00.11truefalsenulltruetruefalse
nullfalsetruenullfalse
falsenulltruefalse
false
false
falsenullfalsefalsenullnullnullnullfalse
null208