matt
matt

Reputation: 44303

PHP: calculate year count from business start year?

What is the easiest solution to calculate the year count from a starting of a business.

We build stuff for 23 years.

I want to replace "23" with a dynamic PHP variable. The starting date of the business is 2004.

What is the shortest and most elegant version to do this?

Upvotes: 0

Views: 788

Answers (1)

thesunneversets
thesunneversets

Reputation: 2580

date("Y") - 2004;

Or some variant thereof?

Upvotes: 5

Related Questions