o0O0o.o0O0o
01-14-2008, 03:19 AM
hi friends ,
I am concatenating the day and month of the year to change the delivery day in case of public holiday
the code i am using is
$pbDate2 = date('d')+$i;
$pbMon2 = date('m');
if($pbDate2 > 31)
{ $pbDate2 = $pbDate2 - 31;
$pbMon2 = $pbMon2 + 1;
if($pbMon2 >12)
$pbMon2 = $pbMon2-12 ;
}
$pbDate2 = $pbDate2.$pbMon2;
The problem is e.g
if my delivery day start fro 28 dec and gos to 3 january and there is holiday on 2 jan
then pbdate2 variable will return "21"
2 for day and 1 for month
The problem occured when date is 1 jan , then month variable is returned as 01 and the variable becomes 201.
This problem occured yhis year and there are customers who placed orders for 2 januray on 1 january. I check from december month but not on 1 january.
Any simple solution?
I am concatenating the day and month of the year to change the delivery day in case of public holiday
the code i am using is
$pbDate2 = date('d')+$i;
$pbMon2 = date('m');
if($pbDate2 > 31)
{ $pbDate2 = $pbDate2 - 31;
$pbMon2 = $pbMon2 + 1;
if($pbMon2 >12)
$pbMon2 = $pbMon2-12 ;
}
$pbDate2 = $pbDate2.$pbMon2;
The problem is e.g
if my delivery day start fro 28 dec and gos to 3 january and there is holiday on 2 jan
then pbdate2 variable will return "21"
2 for day and 1 for month
The problem occured when date is 1 jan , then month variable is returned as 01 and the variable becomes 201.
This problem occured yhis year and there are customers who placed orders for 2 januray on 1 january. I check from december month but not on 1 january.
Any simple solution?