From 602cb47a1e1495fb833a1f56e6facfa823db933f Mon Sep 17 00:00:00 2001 From: liam4 Date: Fri, 2 Sep 2016 01:01:17 -0300 Subject: [PATCH] Remove unused util variable --- src/blocks/scratch3_sensing.js | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/src/blocks/scratch3_sensing.js b/src/blocks/scratch3_sensing.js index 3271990f3..44e5a9b3c 100644 --- a/src/blocks/scratch3_sensing.js +++ b/src/blocks/scratch3_sensing.js @@ -42,23 +42,16 @@ Scratch3SensingBlocks.prototype.getMouseDown = function (args, util) { return util.ioQuery('mouse', 'getIsDown'); }; -Scratch3SensingBlocks.prototype.current = function (args, util) { +Scratch3SensingBlocks.prototype.current = function (args) { var date = new Date(); switch (args.CURRENTMENU) { - case 'year': - return date.getFullYear(); - case 'month': - return date.getMonth(); - case 'date': - return date.getDate(); - case 'dayofweek': - return date.getDay(); - case 'hour': - return date.getHours(); - case 'minute': - return date.getMinutes(); - case 'second': - return date.getSeconds(); + case 'year': return date.getFullYear(); + case 'month': return date.getMonth() + 1; // getMonth is zero-based + case 'date': return date.getDate(); + case 'dayofweek': return date.getDay(); + case 'hour': return date.getHours(); + case 'minute': return date.getMinutes(); + case 'second': return date.getSeconds(); } };