ReactOS 0.4.15-dev-7924-g5949c20
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 */
15char* _strdate(char* date)
16{
17 static const char format[] = "MM'/'dd'/'yy";
18
20
21 return date;
22
23}
24
25/*
26 * @implemented
27 */
28int 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
44 return 0;
45}
#define EINVAL
Definition: acclib.h:90
#define ERANGE
Definition: acclib.h:92
#define NULL
Definition: types.h:112
#define CDECL
Definition: compat.h:29
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GLsizeiptr size
Definition: glext.h:5919
INT WINAPI GetDateFormatA(LCID lcid, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCSTR lpFormat, LPSTR lpDateStr, INT cchOut)
Definition: lcformat.c:936
__u16 date
Definition: mkdosfs.c:8
#define LOCALE_NEUTRAL
_CRTIMP int *__cdecl _errno(void)
Definition: errno.c:19
char * _strdate(char *date)
Definition: strdate.c:15
int CDECL _strdate_s(char *date, size_t size)
Definition: strdate.c:28