GameMaker: Studio

GameMaker: Studio

View Stats:
trandion Sep 3, 2015 @ 9:44am
Problem with "date_get_week"
Hi everyone.
I have a problem with this code:

######################################################################
var woche;
var datum;
datum = date_create_datetime(current_year, current_month, current_day, 12, 0, 0);

woche = date_get_week(datum);
######################################################################

My "woche" says it is the week "35" but it is "36".
Can someone check this example please.
Work this for you correct?

p.s.:
Sorry for my english.
< >
Showing 1-1 of 1 comments
Thew Sep 3, 2015 @ 11:34am 
I'm not familiar with these functions, but a lot of things in programming are "zero based," making "0" the first number (i.e. the first index in an array or data structure).

It's also possible that this is dividing the total number of days so far by 7, which would make the second week "1" and third week "2", etc.

weeks = days / 7
< >
Showing 1-1 of 1 comments
Per page: 1530 50

Date Posted: Sep 3, 2015 @ 9:44am
Posts: 1