WordPress: count time from registration date to today
I would like to add to the user profile the time from registration to the current day in the format:
With us: 7 years 3 months 2 weeks 6 days
OR
With us: 1 year 1 month 1 week 1 day
I bit helped this post Count days from registration date to today, but their countdown goes only in days.
Rony cortze
You can use strtotime(get_userdata(get_current_user_id( ))->user_registered)) to get register date, After you compare with time() to get number year, month, day.