Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
676 B

  1. // xdateord -- look up date ordering for Microsoft
  2. #include <cruntime.h>
  3. #include <locale>
  4. #include <setlocal.h>
  5. #include <tchar.h>
  6. _STD_BEGIN
  7. extern "C" int __cdecl _Getdateorder()
  8. { // return date order for current locale
  9. _TCHAR buf[2] = {0};
  10. GetLocaleInfo(___lc_handle_func()[LC_TIME], LOCALE_ILDATE,
  11. buf, sizeof (buf) / sizeof (buf[0]));
  12. return (buf[0] == _T('0') ? std::time_base::mdy
  13. : buf[0] == _T('1') ? std::time_base::dmy
  14. : buf[0] == _T('2') ? std::time_base::ymd
  15. : std::time_base::no_order);
  16. }
  17. _STD_END
  18. /*
  19. * Copyright (c) 1992-2001 by P.J. Plauger. ALL RIGHTS RESERVED.
  20. * Consult your license regarding permissions and restrictions.
  21. V3.10:0009 */