Function SDL_GetDateTimeLocalePreferences

pub unsafe extern "C" fn SDL_GetDateTimeLocalePreferences(
    dateFormat: *mut SDL_DateFormat,
    timeFormat: *mut SDL_TimeFormat,
) -> bool
Available on crate feature dep_sdl3 only.
Expand description

Gets the current preferred date and time format for the system locale.

This might be a “slow” call that has to query the operating system. It’s best to ask for this once and save the results. However, the preferred formats can change, usually because the user has changed a system preference outside of your program.

§Parameters

  • dateFormat: a pointer to the SDL_DateFormat to hold the returned date format, may be NULL.
  • timeFormat: a pointer to the SDL_TimeFormat to hold the returned time format, may be NULL.

§Return value

Returns true on success or false on failure; call SDL_GetError() for more information.

§Availability

This function is available since SDL 3.2.0.