Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitec86e4b

Browse files
author
Bryan Henderson
committed
Use EUROPEAN_DATES instead of EUROPEAN_STYLE
1 parent3010f46 commitec86e4b

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

‎src/backend/utils/adt/datetimes.c

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/datetimes.c,v 1.3 1996/08/27 07:32:30 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/datetimes.c,v 1.4 1996/10/25 06:02:52 bryanh Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
14-
#include"config.h"
15-
1614
#include<stdio.h>/* for sprintf() */
1715
#include<string.h>
18-
#include"postgres.h"
19-
#include"utils/palloc.h"
20-
#include"utils/elog.h"
16+
17+
#include<config.h>
18+
#include<postgres.h>
19+
#include<utils/palloc.h>
20+
#include<utils/elog.h>
2121

2222
/* these things look like structs, but we pass them by value so be careful
2323
For example, passing an int -> DateADT is not portable! */
@@ -33,9 +33,6 @@ typedef struct TimeADT {
3333
floatsec;
3434
}TimeADT;
3535

36-
#ifndefEUROPEAN_STYLE
37-
#defineAMERICAN_STYLE
38-
#endif
3936

4037
staticintday_tab[2][12]= {
4138
{31,28,31,30,31,30,31,31,30,31,30,31},
@@ -69,7 +66,7 @@ date_in(char *datestr)
6966
# defineCHECK_DATE_LEN(datestr) 1
7067
#endif
7168

72-
#ifdefAMERICAN_STYLE
69+
#ifndefEUROPEAN_DATES
7370
if (!CHECK_DATE_LEN(datestr)||
7471
sscanf(datestr,"%d%*c%d%*c%d",&m,&d,&y)!=3) {
7572
elog(WARN,"date_in: date \"%s\" not of the form mm-dd-yyyy",
@@ -113,7 +110,7 @@ date_out(int4 dateVal)
113110
date= (DateADT*)&dateStore;
114111
dateStore=dateVal;
115112

116-
#ifdefAMERICAN_STYLE
113+
#ifndefEUROPEAN_DATES
117114
sprintf(datestr,"%02d-%02d-%04d",
118115
(int)date->month, (int)date->day, (int)date->year);
119116
#else

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp