SDL_DateFormat(3type)
π SDL_DateFormat π
okay bestie, welcome to the SDL3 DATATYPES corner of the manual, where we talk about SDL_DateFormat β literally just the date format that your current system locale is obsessed with. that's it. that's the whole vibe. π
It's giving "what order do the numbers go in" and honestly? iconic.
β¨ SYNOPSIS β¨
first things first, you gotta let the compiler know what's up:
#include <SDL3/SDL_time.h>
typedef enum SDL_DateFormat
{
SDL_DATE_FORMAT_YYYYMMDD = 0, /**< Year/Month/Day */
SDL_DATE_FORMAT_DDMMYYYY = 1, /**< Day/Month/Year */
SDL_DATE_FORMAT_MMDDYYYY = 2 /**< Month/Day/Year */
} SDL_DateFormat;
so like, it's an enum, she's a typedef, and she comes with three whole moods. let's break them down π
SDL_DATE_FORMAT_YYYYMMDD=0β Year/Month/Day. big-endian girlies rise up, the ISO 8601 girlies, the "sortable by default" queens. πSDL_DATE_FORMAT_DDMMYYYY=1β Day/Month/Year. the day comes FIRST, she's eager, she's ready. π¦SDL_DATE_FORMAT_MMDDYYYY=2β Month/Day/Year. month leads the parade, no notes. πΈ
and that's literally the entire enum. three little ints, all besties, all valid.
π AVAILABILITY π
This enum is available since SDL 3.2.0. so if you're on something older, no she's not there, don't go looking, she hasn't been born yet. π
π SEE ALSO π
SDL_GetDateTimeLocalePreferences(3)β go read her next, she's the one who actually tells you which of these three formats your system picked. the enum is just the vocabulary, that function is the gossip. π«Ά
and that's the whole page bestie, you ate it, you understood it, periodt πβ¨
this little datatype page came to you courtesy of Simple Directmedia Layer, version SDL 3.4.18, and she's filed under SDL_DateFormat(3type) β mwah, go forth and format your dates correctly, i'm obsessed with you ππ
π¦ 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