Added a formatting method to print the age of a datetime object, and modified the lease view to use it. I anticipate customizing the function to be more fuzzy and less precise.

git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@89 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-06-10 17:06:35 +00:00
parent 760420bdc5
commit 147c1e7097
2 changed files with 36 additions and 33 deletions

View File

@@ -64,4 +64,9 @@ class FormatHelper extends AppHelper {
return $comment;
}
function age($datetime) {
return $time->timeAgoInWords($datetime,
array('end' => '+99 years'));
}
}