SDL_GetDayOfWeek(3)
β¨ SDL_GetDayOfWeek β¨
okay bestie, welcome to SDL_GetDayOfWeek(3) β it's a lil function from the SDL3 FUNCTIONS family and it's here to tell you what day of the week a calendar date lands on. manifesting your schedule era π
πΈ NAME πΈ
SDL_GetDayOfWeek β Get the day of week for a calendar date. no cap, that's literally the whole job. ποΈβ¨
π SYNOPSIS π
#include <SDL3/SDL_time.h>
int SDL_GetDayOfWeek(int year, int month, int day);
she's giving "small function, big purpose" energy fr fr π
π¦ FUNCTION PARAMETERS π¦
yearβ the year component of the date. yes, the whole year. give her the full number. πmonthβ the month component of the date. πdayβ the day component of the date. the actual day-day, not the weekday. okay that wording is confusing but you get it π
π RETURN VALUE π
Returns a value between 0 and 6 β and 0 is Sunday β if the date is valid. π
If it's not valid, you get -1 on failure. and when that happens? call SDL_GetError() for more information, bestie. she will tell you what went wrong. π«Ά
so like...0= Sunday,6= Saturday. internalize that. it's giving "week starts on Sunday" and honestly? iconic of her.
π§ THREAD SAFETY π§
It is safe to call this function from any thread. go off, thread wherever you want, she does not care. πβ¨
β AVAILABILITY β
This function is available since SDL 3.2.0. so if you're on anything older, bestie... it's not there. π
and that's the whole page!! π made with love by the Simple Directmedia Layer girlies, SDL 3.4.18, and this particular page is dated with the version stamp of that same release. stay hydrated, call your functions, and remember: every day is a valid day if you believe ππ β¨
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms