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

Commit99e57ee

Browse files
author
Thomas G. Lockhart
committed
Move some useful date/time test macros to here to allow
sharing across files.
1 parent879d1be commit99e57ee

File tree

1 file changed

+15
-1
lines changed
  • src/include/utils

1 file changed

+15
-1
lines changed

‎src/include/utils/dt.h

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
* Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $Id: dt.h,v 1.38 1999/03/14 16:03:16 momjian Exp $
11+
* $Id: dt.h,v 1.39 1999/04/15 02:24:23 thomas Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -285,6 +285,20 @@ extern int day_tab[2][13];
285285
|| ((y == JULIAN_MINYEAR) && ((m > JULIAN_MINMONTH) \
286286
|| ((m == JULIAN_MINMONTH) && (d >= JULIAN_MINDAY)))))
287287

288+
#defineUTIME_MINYEAR (1901)
289+
#defineUTIME_MINMONTH (12)
290+
#defineUTIME_MINDAY (14)
291+
#defineUTIME_MAXYEAR (2038)
292+
#defineUTIME_MAXMONTH (01)
293+
#defineUTIME_MAXDAY (18)
294+
295+
#defineIS_VALID_UTIME(y,m,d) (((y > UTIME_MINYEAR) \
296+
|| ((y == UTIME_MINYEAR) && ((m > UTIME_MINMONTH) \
297+
|| ((m == UTIME_MINMONTH) && (d >= UTIME_MINDAY))))) \
298+
&& ((y < UTIME_MAXYEAR) \
299+
|| ((y == UTIME_MAXYEAR) && ((m < UTIME_MAXMONTH) \
300+
|| ((m == UTIME_MAXMONTH) && (d <= UTIME_MAXDAY))))))
301+
288302
/*
289303
* dt.c prototypes
290304
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp