neko
neko copied to clipboard
Fix date_format crash on Windows
Closes #211
strftime crashes on Windows if it receives invalid parameters, so we need to manually validate the format parameter to avoid crashing.
See: https://stackoverflow.com/a/64328476 https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l?view=msvc-170#remarks https://en.cppreference.com/w/c/chrono/strftime