I'm using the follow script call to check a date stored in a variable as a string and store day, month and year in other three differents variables:
It seems to recognize mm/dd/yyyy or yyyy/mm/dd formats, but how can I check for dd/mm/yyyy format?
Greetings
Code:
let testString = $gameVariables.value(1)
let testDate = new Date(testString);
$gameVariables.setValue(2, testDate.getDate());
$gameVariables.setValue(3, testDate.getMonth()+1);
$gameVariables.setValue(4, testDate.getYear()+1900);
It seems to recognize mm/dd/yyyy or yyyy/mm/dd formats, but how can I check for dd/mm/yyyy format?
Greetings