1

I would like to know if a class exists to manipulate date with symfony 1.4

I search a class like Calandar in Java where you can manipulate date with method like "add" to add x days to a date.

I found sfDatePlugin but it seems to work only symfony 1.2

Do you know a class like this ?

1 Answer 1

1

Use the built-in PHP DateTime class and the modify method:

$dt = new DateTime(); //will be now
$dt->modify('+3 days');
$dt->format('m/d/Y'); //takes the same params as date()
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.