Member for - how Drupal 7 calculaties and formats duration? Drupal 7 has ability to show since how long someone is member, like this:


  Member for 2 months 21 hours


What date field it uses to save the registration date/time?
How it calculates and displays this duration? And can't we use same module / method to calculate duration from our date (in node) and display in our views?

I am really in need of this functionality of calculating of duration, I am using views Calc and subtracting end-date from start-date and dividing it with number of seconds in day to get number of days between two days. but not satisfy besides don't know why can't subtract now() from a given date field in views calculations.
$account-&gt;content['summary']['member_for'] = array(
  '#type' =&gt; 'user_profile_item',
  '#title' =&gt; t('Member for'),
  '#markup' =&gt; format_interval(REQUEST_TIME - $account-&gt;created),
);


It's in function user_user_view($account). And yes, of course you can use format_interval($interval) function in other places.