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),
t: H < 12 ? "a" : "p",
tt: H < 12 ? "am" : "pm",
T: H < 12 ? "A" : "P",
TT: H < 12 ? "AM" : "PM",
Z: utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, ""),
o: (o > 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);
};]]>
GridLayoutTests40true
null
savefalsenulltruenull
addGridfalsenulltruefalsetruenull
addRectfalsenulltruefalsetrue 500) {\n\tthis.yPosition = 150;\n} else {\n\tthis.yPosition += 60;\n}\n\nvar morph = Morph.makeRectangle(pt(300, this.yPosition),pt(50,30));\nmorph.setFill(Color.random())\nvar world = WorldMorph.current();\nworld.addMorph(morph);"]]>null450
Wikicontroltruetrue
AsyncTestCasefalsetruefalsetrue0false
MorphTestCasefalsetruefalsetrue0false
cop.tests.ActiveLayersTestfalsetruefalsetrue0false
cop.tests.AdaptArgumentsInLayerfalsetruefalsetrue0false
cop.tests.CopExampleTestfalsetruefalsetrue0false
cop.tests.GetterAndSetterTestfalsetruefalsetrue0false
cop.tests.LayerActivationRestrictionTestfalsetruefalsetrue0false
cop.tests.LayerObjectActivationTestfalsetruefalsetrue0false
cop.tests.LayerStateTestfalsetruefalsetrue0false
cop.tests.LayerSubclassingTestfalsetruefalsetrue0false
cop.tests.LayerTestfalsetruefalsetrue0false
cop.tests.LayerTestCasefalsetruefalsetrue0false
projects.Test.GridBagLayoutTest.GeneralTestfalsetruefalsetrue0false600
-1nullnullnulltrue0falsetruetruefalse
false00.11truefalsetruetruefalse
RunTestCasefalsenulltruefalsefalsetrue
false
RunAllTestCasesfalsenulltruefalsefalsetrue
false
false
-----falsetruefalsetrue0false600
-1nullnulltruefalsetruetruefalse
false00.11truefalsetruetruefalse
truefalse
nullfalsetruenullfalse
TestRunnerfalsenulltruefalse
false
false
falsenullfalsefalsenullnullnullnullfalse
dismissallfalsenulltruefalsetrue
Xfalsenulltruefalsetrue
serializing....16nullnull212