mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 15:02:52 -05:00
getDay is zero-based where Sunday = 0; Sunday should be 1
This commit is contained in:
parent
602cb47a1e
commit
1437a358e1
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ Scratch3SensingBlocks.prototype.current = function (args) {
|
||||||
case 'year': return date.getFullYear();
|
case 'year': return date.getFullYear();
|
||||||
case 'month': return date.getMonth() + 1; // getMonth is zero-based
|
case 'month': return date.getMonth() + 1; // getMonth is zero-based
|
||||||
case 'date': return date.getDate();
|
case 'date': return date.getDate();
|
||||||
case 'dayofweek': return date.getDay();
|
case 'dayofweek': return date.getDay() + 1; // getDay is zero-based, Sun=0
|
||||||
case 'hour': return date.getHours();
|
case 'hour': return date.getHours();
|
||||||
case 'minute': return date.getMinutes();
|
case 'minute': return date.getMinutes();
|
||||||
case 'second': return date.getSeconds();
|
case 'second': return date.getSeconds();
|
||||||
|
|
Loading…
Reference in a new issue