Question: I'm currently using this code in wordpress:

```
// [date]  
function displaydate(){  
return date('l, F jS, Y');  
}  
add_shortcode('date', 'displaydate');  
// end date

```

--

What I want to do is add another shortcode that would display todays date +1day.

So I could write something like this:

'...offer runs out [todays date +1day]'

Anyone know how to do this?

Answer: 
The easiest way in PHP would be using the [strtotime](http://php.net/manual/en/function.strtotime.php) function.

As for your code you would add:

```
return date('l, F jS, Y', strtotime('+1 day'));

```

Based on your original code a 'shortcode' called 'tomorrow' would look like this:

```
// [tomorrow]  
function displaydate_tomorrow(){  
    return date('l, F jS, Y', strtotime('+1 day')); 
}  
add_shortcode('tomorrow', 'displaydate_tomorrow'); 
// end tomorrows date

```
The PHP documentation is really comprehensive when it comes to date manipulation, so finding a suitable solution should be quite easy. Here's one possible solution:

```
function displaydate($plus_days) {
  return date('l, F jS, Y', strtotime('+' . $plus_days . ' day'));
}

```

<http://uk3.php.net/manual/en/function.strtotime.php>