MCPcopy Index your code
hub / github.com/MapServer/MapServer / msTimeCompare

Function msTimeCompare

maptime.c:106–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106int msTimeCompare(struct tm *time1, struct tm *time2)
107{
108 int result;
109
110 if((result = compareIntVals(time1->tm_year, time2->tm_year)) != 0)
111 return result; /* not equal based on year */
112 else if((result = compareIntVals(time1->tm_mon, time2->tm_mon)) != 0)
113 return result; /* not equal based on month */
114 else if((result = compareIntVals(time1->tm_mday, time2->tm_mday)) != 0)
115 return result; /* not equal based on day of month */
116 else if((result = compareIntVals(time1->tm_hour, time2->tm_hour)) != 0)
117 return result; /* not equal based on hour */
118 else if((result = compareIntVals(time1->tm_min, time2->tm_min)) != 0)
119 return result; /* not equal based on minute */
120 else if((result = compareIntVals(time1->tm_sec, time2->tm_sec)) != 0)
121 return result; /* not equal based on second */
122
123 return(0); /* must be equal */
124}
125
126#if defined(_WIN32) && !defined(__CYGWIN__)
127#include <sys/timeb.h>

Callers 3

yyparseFunction · 0.85
_msValidateTimeFunction · 0.85

Calls 1

compareIntValsFunction · 0.85

Tested by

no test coverage detected