= Preparation =
1. Open `core/units/users/users_config.php` for editing and change line 370 to:
```
'CreatedOn' => Array ('formatter' => 'kDateFormatter', 'format' => 'relative:1', 'default' => '#NOW#'),
```
= Testing `kDateFormatter` =
1. Login to `Admin console`
2. Go to {nav User Management > Users}
3. Open some user for editing and change Created On date to 2 years and some days ago
4. Save user
5. Confirm Created On of edited user looks like '2 years ago'
6. Change `core/units/users/users_config.php`, line 370 to:
```
'CreatedOn' => Array ('formatter' => 'kDateFormatter', 'format' => 'relative:2', 'default' => '#NOW#'),
```
7. Refresh users' list
8. Confirm Created On of edited user looks like '2 years, 6 months ago' (months should correspond to entered value)
9. Change `core/units/users/users_config.php`, line 370 to:
```
'CreatedOn' => Array ('formatter' => 'kDateFormatter', 'format' => 'relative:3', 'default' => '#NOW#'),
```
10. Refresh users' list
11. Confirm Created On of edited user looks like '2 years, 6 months, 3 weeks ago' (values should correspond to entered value)
12. Change `core/units/users/users_config.php`, line 370 to:
```
'CreatedOn' => Array ('formatter' => 'kDateFormatter', 'format' => 'relative:4', 'default' => '#NOW#'),
```
13. Refresh users' list
14. Confirm Created On of edited user looks like '2 years, 6 months, 3 weeks, 15 hours ago' (values should correspond to entered value)
15. Change `core/units/users/users_config.php`, line 370 to:
```
'CreatedOn' => Array ('formatter' => 'kDateFormatter', 'format' => 'relative:5', 'default' => '#NOW#'),
```
16. Refresh users' list
17. Confirm Created On of edited user looks like '2 years, 6 months, 3 weeks, 15 hours, 49 minutes ago' (values should correspond to entered value)
18. Change `core/units/users/users_config.php`, line 370 to:
```
'CreatedOn' => Array ('formatter' => 'kDateFormatter', 'format' => 'relative:6', 'default' => '#NOW#'),
```
19. Refresh users' list
20. Confirm Created On of edited user looks like '2 years, 6 months, 3 weeks, 15 hours, 50 minutes, and 20 seconds ago' (values should correspond to entered value)
= Testing `DateHelper::getShortHumanTime()` =
1. Add method into the end of `PhraseTagProcessor` class in `core/units/phrases/phrase_tp.php`:
``` lang=php, name=core/units/phrases/phrase_tp.php
protected function RelatedModifiedOn($params)
{
/** @var kDBItem $object */
$object = $this->getObject($params);
/** @var DateHelper $date_helper */
$date_helper = $this->Application->recallObject('DateHelper');
return $date_helper->getShortHumanTime(TIMENOW - $object->GetDBField('LastChanged'));
}
```
2. Add tag into `core/admin_templates/languages/phrase_edit.tpl` just before `<div id="scroll_container">`:
``` lang=xml, name=core/admin_templates/languages/phrase_edit.tpl
<inp2:phrases_RelatedModifiedOn/>
```
3. Go to admin console, {nav Website & Content > Labels & Phrases}
4. Select some phrase, not it's `Modified On` time and click Edit
5. Confirm you see relative time like `3d 17h 22mi 43s` just under header. It should correspond to noted `Modified On`