FreeBASIC  0.91.0
drv_intl_getdateformat.c
Go to the documentation of this file.
1 /* get localized short DATE format */
2 
3 #include "../fb.h"
4 #include "fb_private_intl.h"
5 
6 int fb_DrvIntlGetDateFormat( char *buffer, size_t len )
7 {
9 
10  if( len < 11 )
11  return FALSE;
12  if( !fb_hIntlGetInfo( &Info ) )
13  return FALSE;
14 
15  switch( Info.date_format ) {
16  case 0:
17  strcpy( buffer, "MM/dd/yyyy" );
18  break;
19  case 1:
20  strcpy( buffer, "dd/MM/yyyy" );
21  break;
22  case 2:
23  strcpy( buffer, "yyyy/MM/dd" );
24  break;
25  default:
26  return FALSE;
27  }
28 
29  return TRUE;
30 }