Difference between revisions of "User:Rasikko"
→Time Functions: updated GetCurrentDayOfWeek
imported>Scrivener07 (GetAnyDayOfWeek) |
imported>Scrivener07 (→Time Functions: updated GetCurrentDayOfWeek) |
||
Line 37: | Line 37: | ||
<source lang="papyrus"> | <source lang="papyrus"> | ||
String Function GetCurrentDayOfWeek(Float afDaysPassed) Global | String Function GetCurrentDayOfWeek(Float afDaysPassed) Global | ||
; Returns the day of week | ; Returns the day of week. | ||
Int dayOfWeek = afDaysPassed as int % 7 | Int dayOfWeek = afDaysPassed as int % 7 | ||
String[] daysOfWeek = new String[7] | |||
daysOfWeek[0] = "Sunday" | |||
daysOfWeek[1] = "Monday" | |||
daysOfWeek[2] = "Tuesday" | |||
daysOfWeek[3] = "Wednesday" | |||
daysOfWeek[4] = "Thursday" | |||
daysOfWeek[5] = "Friday" | |||
daysOfWeek[6] = "Saturday" | |||
return | return daysOfWeek[dayOfWeek] | ||
EndFunction | EndFunction | ||
</source> | </source> |