GameMaker: Studio

GameMaker: Studio

Vis statistikk:
trandion 3. sep. 2015 kl. 9.44
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.
< >
Viser 11 av 1 kommentarer
Thew 3. sep. 2015 kl. 11.34 
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
< >
Viser 11 av 1 kommentarer
Per side: 1530 50

Dato lagt ut: 3. sep. 2015 kl. 9.44
Innlegg: 1