| Return Type | Function name | Arguments |
|---|---|---|
| unsigned int | IsTime | (unsigned int&,unsigned int&,unsigned int&,const char*,) |
Declared in file: hzTextproc.h
Defined in file : hzDate.cpp
Function Logic:
Function body:
unsigned int IsTime (unsigned int& h, unsigned int& m, unsigned int& s, const char* cpStr)
{
const char* i = cpStr ;
if (!i || i[0]== 0)
return 0;
if (IsDigit(i[0])&& IsDigit(i[1])&& IsDigit(i[2])&& IsDigit(i[3])&& IsDigit(i[4])&& IsDigit(i[5])&& i[6]<&eq; CHAR_SPACE)
{
h = (10*(i[0]- ''0''))+(i[1]- ''0'');
m = (10*(i[2]- ''0''))+(i[3]- ''0'');
s = (10*(i[4]- ''0''))+(i[5]- ''0'');
return (h < 24&&m < 60&&s < 60)?6: 0;
}
if (IsDigit(i[0])&& IsDigit(i[1])&& i[2]== CHAR_COLON && IsDigit(i[3])&& IsDigit(i[4])&& i[5]== CHAR_COLON && IsDigit(i[6])&& IsDigit(i[7])&& i[8]<&eq; CHAR_SPACE)
{
h = (10*(i[0]- ''0''))+(i[1]- ''0'');
m = (10*(i[3]- ''0''))+(i[4]- ''0'');
s = (10*(i[6]- ''0''))+(i[7]- ''0'');
return (h < 24&&m < 60&&s < 60)?8: 0;
}
return 0;
}