Explorar o código

getMonth() returns month from 0 to 11 and not 1 to 12...

Vousk-prod %!s(int64=9) %!d(string=hai) anos
pai
achega
c0e87eff30
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Tools/babylon.tools.ts

+ 1 - 1
src/Tools/babylon.tools.ts

@@ -592,7 +592,7 @@
                     var a = window.document.createElement("a");
                     a.href = base64Image;
                     var date = new Date();
-                    var stringDate = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() + "_" + date.getHours() + "-" + ('0' + date.getMinutes()).slice(-2);
+                    var stringDate = date.getFullYear() + "-" + (date.getMonth()+1)).slice(-2) + "-" + date.getDate() + "_" + date.getHours() + "-" + ('0' + date.getMinutes()).slice(-2);
                     a.setAttribute("download", "screenshot_" + stringDate + ".png");
 
                     window.document.body.appendChild(a);