Log 2635

$openingDate = #תאריך פתיחה#; // Replace with the actual opening date

// Split the opening date into day, month, and year
$dateParts = explode(‘/’, $openingDate);
$day = intval($dateParts[0]);
$month = intval($dateParts[1]);
$year = intval($dateParts[2]);

// Add 31 days to the opening date
$newDay = $day + 31;

// Check if the new day exceeds the maximum number of days in a month
if ($newDay > 31) {
$newDay -= 31;
$month++;

// Check if the new month exceeds December (12)
if ($month > 12) {
$month -= 12;
$year++;
}
}

// Format the new date as dd/mm/yyyy
$newDate = sprintf(‘%02d/%02d/%04d’, $newDay, $month, $year);

return $newDate; // Output: The calculated date that is 31 days after #תאריך פתיחה#

Select the fields to be shown. Others will be hidden. Drag and drop to rearrange the order.
  • Image
  • SKU
  • Rating
  • Price
  • Stock
  • Availability
  • Add to cart
  • Description
  • Content
  • Weight
  • Dimensions
  • Additional information
  • Attributes
  • Custom attributes
  • Custom fields
Click outside to hide the comparison bar
Compare