strcmp date
#5

You can use this function I've just wrote it and tested it worked well. .-.

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(date1date2true))
   {
      return 
1;
   }
   else
   {
      new 
number[3][20],area1 strfind(date1"-"true0)+1;
      
strmid(number[0], date10area1-1);
      
strmid(number[1], date1area1strfind(date1"-"truearea1));
      
area1 strfind(date1"-"truearea1)+1;
      
strmid(number[2], date1area1strlen(date1));
      new 
number1[3][20];
      
area1 strfind(date2"-"true0)+1;
      
strmid(number1[0], date20area1-1);
      
strmid(number1[1], date2area1strfind(date2"-"truearea1));
      
area1 strfind(date2"-"truearea1)+1;
      
strmid(number1[2], date2area1strlen(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;
      }
   }

Reply


Messages In This Thread
strcmp date - by ScIrUsna - 20.06.2016, 05:41
Re: strcmp date - by Vince - 20.06.2016, 07:26
Re: strcmp date - by ScIrUsna - 20.06.2016, 08:49
Re: strcmp date - by kaZax - 20.06.2016, 09:29
Re: strcmp date - by jlalt - 20.06.2016, 09:54
Re: strcmp date - by ScIrUsna - 20.06.2016, 10:22
Re: strcmp date - by Konstantinos - 20.06.2016, 10:34
Re: strcmp date - by ScIrUsna - 20.06.2016, 10:42
Re: strcmp date - by Konstantinos - 20.06.2016, 10:47
Re: strcmp date - by ScIrUsna - 20.06.2016, 11:31
Re: strcmp date - by jlalt - 20.06.2016, 21:46
Re: strcmp date - by ScIrUsna - 21.06.2016, 03:55
Re: strcmp date - by jlalt - 21.06.2016, 11:29

Forum Jump:


Users browsing this thread: 1 Guest(s)