Bug 25819: Update to Unicode 13.0.0
[glibc.git] / time / tst_wcsftime.c
blob55c45f6a8131a6981b0870d3f77b86bac0efb6b7
1 #include <time.h>
2 #include <wchar.h>
4 int
5 main (int argc, char *argv[])
7 wchar_t buf[200];
8 time_t t;
9 struct tm *tp;
10 int result = 0;
11 size_t n;
13 t = time (NULL);
14 tp = gmtime (&t);
16 n = wcsftime (buf, sizeof (buf) / sizeof (buf[0]),
17 L"%H:%M:%S %Y-%m-%d\n", tp);
18 if (n != 21)
19 result = 1;
21 wprintf (L"It is now %ls", buf);
23 wcsftime (buf, sizeof (buf) / sizeof (buf[0]), L"%A\n", tp);
25 wprintf (L"The weekday is %ls", buf);
27 return result;