#include #include #include int main (void) { UDateFormat *fmt; UErrorCode status = U_ZERO_ERROR; UDate date; UChar result[128]; date = ucal_getNow (); fmt = udat_open (UDAT_NONE, UDAT_NONE, "nl_BE", NULL, 0, NULL, 0, &status); if (status != U_ZERO_ERROR) u_printf ("udat_open() error!\n"); udat_format (fmt, date, result, 128, NULL, &status); if (status != U_ZERO_ERROR) u_printf ("udat_open() error!\n"); else u_printf ("Date Formatted with defaults: %S\n", result); udat_close (fmt); fmt = udat_open (UDAT_NONE, UDAT_MEDIUM, "nl_BE", NULL, 0, NULL, 0, &status); if (status != U_ZERO_ERROR) u_printf ("udat_open() error!\n"); udat_format (fmt, date, result, 128, NULL, &status); if (status != U_ZERO_ERROR) u_printf ("udat_open() error!\n"); else u_printf ("Date Formatted with defaults: %S\n", result); udat_close (fmt); fmt = udat_open (UDAT_LONG, UDAT_LONG, "nl_BE", NULL, 0, NULL, 0, &status); if (status != U_ZERO_ERROR) u_printf ("udat_open() error!\n"); udat_format (fmt, date, result, 128, NULL, &status); if (status != U_ZERO_ERROR) u_printf ("udat_open() error!\n"); else u_printf ("Date Formatted with defaults: %S\n", result); udat_close (fmt); return 0; }