20.06.2016, 09:54
You can use this function I've just wrote it and tested it worked well. .-.
Usage Example:
Usage Example:
PHP код:
new date[25] = "2016-06-20";
if(CheckDateSame(date,"2016-6-20")) {
printf("They Are Same");
}
else
{
printf("They Are Not Same");
}
PHP код:
CheckDateSame(date1[25], date2[25]) {
if(!strcmp(date1, date2, true))
{
return 1;
}
else
{
new number[3][20],area1 = strfind(date1, "-", true, 0)+1;
strmid(number[0], date1, 0, area1-1);
strmid(number[1], date1, area1, strfind(date1, "-", true, area1));
area1 = strfind(date1, "-", true, area1)+1;
strmid(number[2], date1, area1, strlen(date1));
new number1[3][20];
area1 = strfind(date2, "-", true, 0)+1;
strmid(number1[0], date2, 0, area1-1);
strmid(number1[1], date2, area1, strfind(date2, "-", true, area1));
area1 = strfind(date2, "-", true, area1)+1;
strmid(number1[2], date2, area1, strlen(date2));
if(strval(number[0]) == strval(number1[0]) && strval(number[1]) == strval(number1[1]) && strval(number[2]) == strval(number1[2]))
{
return 1;
}
else
{
return 0;
}
}
}