Add (days since 2000) block. For some reason it is around 1/100th off for me.

This commit is contained in:
Scimonster 2013-10-30 14:28:55 +02:00
parent 64fb52699c
commit 234e044660

View file

@ -31,6 +31,7 @@ SensingPrims.prototype.addPrimsTo = function(primTable) {
primTable['getAttribute:of:'] = this.primGetAttribute;
primTable['timeAndDate'] = this.primTimeDate;
primTable['timestamp'] = this.primTimestamp;
}
SensingPrims.prototype.primTouching = function(b) {
@ -221,6 +222,12 @@ SensingPrims.prototype.primTimeDate = function(b) {
return 0;
}
SensingPrims.prototype.primTimestamp = function() {
var now = new Date();
return (now.getTime() - 946677600000) / 86400000;
// (now - ms since 1/1/2000) / ms in a day
}
// Helpers
SensingPrims.prototype.mouseOrSpritePosition = function(arg) {
if (arg == "_mouse_") {