ReactOS
0.4.16-dev-306-g647d351
strdate.c
Go to the documentation of this file.
1
/*
2
* COPYRIGHT: See COPYING in the top level directory
3
* PROJECT: ReactOS CRT library
4
* FILE: lib/sdk/crt/time/strdate.c
5
* PURPOSE: Fills a buffer with a formatted date representation
6
* PROGRAMER: Ariadne
7
* UPDATE HISTORY:
8
* 28/12/98: Created
9
*/
10
#include <precomp.h>
11
12
/*
13
* @implemented
14
*/
15
char
*
_strdate
(
char
*
date
)
16
{
17
static
const
char
format
[] =
"MM'/'dd'/'yy"
;
18
19
GetDateFormatA
(
LOCALE_NEUTRAL
, 0,
NULL
,
format
,
date
, 9);
20
21
return
date
;
22
23
}
24
25
/*
26
* @implemented
27
*/
28
int
CDECL
_strdate_s
(
char
*
date
,
size_t
size
)
29
{
30
if
(
date
&&
size
)
31
date
[0] =
'\0'
;
32
33
if
(!
date
) {
34
*
_errno
() =
EINVAL
;
35
return
EINVAL
;
36
}
37
38
if
(
size
< 9) {
39
*
_errno
() =
ERANGE
;
40
return
ERANGE
;
41
}
42
43
_strdate
(
date
);
44
return
0;
45
}
EINVAL
#define EINVAL
Definition:
acclib.h:90
ERANGE
#define ERANGE
Definition:
acclib.h:92
NULL
#define NULL
Definition:
types.h:112
CDECL
#define CDECL
Definition:
compat.h:29
size
GLsizeiptr size
Definition:
glext.h:5919
GetDateFormatA
INT WINAPI GetDateFormatA(LCID lcid, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCSTR lpFormat, LPSTR lpDateStr, INT cchOut)
Definition:
lcformat.c:936
date
__u16 date
Definition:
mkdosfs.c:8
LOCALE_NEUTRAL
#define LOCALE_NEUTRAL
_errno
_CRTIMP int *__cdecl _errno(void)
Definition:
errno.c:17
_strdate
char * _strdate(char *date)
Definition:
strdate.c:15
_strdate_s
int CDECL _strdate_s(char *date, size_t size)
Definition:
strdate.c:28
format
Definition:
format.c:58
sdk
lib
crt
time
strdate.c
Generated on Mon Dec 2 2024 06:15:54 for ReactOS by
1.9.6