XF 2.2 How do I add days to the date?

grantus

Active member
In my template I have {{date($value.date_signup, 'F j, Y')}} and I want to be able to add + 1 or whatever number to the day.

I know I can use {{ number({$value} + 1) }} but how can I use that within date?

I tried wrapping number around date and vice versa but get errors.

Normally in PHP it's just to add something like + 1 days, is there something like this in Xenforo?

Any ideas?
 
XF stores dates as seconds by default, so you could just do:

Code:
{{ date($value.date_signup + 86400, 'F j, Y') }}
 
XF stores dates as seconds by default, so you could just do:

Code:
{{ date($value.date_signup + 86400, 'F j, Y') }}
Ah, that makes sense. I was thinking in terms of functions such as number and wondering if there was something in there for date, but this works, thanks!
 
Top Bottom