FireBirdLib - Topfield TMS PVR TAP Programming Library
isMJD.c
Go to the documentation of this file.
1#include "libFireBird.h"
2
3bool isMJD(dword MJD)
4{
6
7 //Check minute
8 if((MJD & 0xff) > 59)
9 {
10 TRACEEXIT();
11 return FALSE;
12 }
13
14 //Check hour
15 if(((MJD >> 8) & 0xff) > 23)
16 {
17 TRACEEXIT();
18 return FALSE;
19 }
20
21 //Check date (2005 to 2038)
22 if((((MJD >> 16) & 0xffff) < 0xD07B) || (((MJD >> 16) & 0xffff) > 0xFF90))
23 {
24 TRACEEXIT();
25 return FALSE;
26 }
27
28 TRACEEXIT();
29 return TRUE;
30}
bool isMJD(dword MJD)
Definition: isMJD.c:3
#define TRACEEXIT()
Definition: libFireBird.h:1244
#define TRACEENTER()
Definition: libFireBird.h:1243
#define MJD(d)
Definition: libFireBird.h:2703