{"action":"created","comment":{"url":"https://api.github.com/repos/yiisoft/yii2/pulls/comments/81717680","pull_request_review_id":2676191,"id":81717680,"diff_hunk":"@@ -828,18 +828,75 @@ public function asRelativeTime($value, $referenceTime = null)\n      *    `P1D2H30M/2015-01-02T13:30:00Z` - time interval before datetime value\n      *    `P1D2H30M` - simply a date interval\n      *    `P-1D2H30M` - a negative date interval (`-1 day, 2 hours, 30 minutes`)\n-     *\n      * @param string $implodeString will be used to concatenate duration parts. Defaults to `, `.\n      * @param string $negativeSign will be prefixed to the formatted duration, when it is negative. Defaults to `-`.\n      * @return string the formatted duration.\n      * @since 2.0.7\n+     * @deprecated Since version 2.0.10. The signature will be changed to [[Formatter::asDurationTime()]] in 2.1\n+     * @see asDurationTime()\n      */\n     public function asDuration($value, $implodeString = ', ', $negativeSign = '-')\n     {\n-        if ($value === null) {\n+        return $this->asDurationTime($value, ['implodeString' => $implodeString, 'negativeSign' => $negativeSign]);\n+    }\n+\n+    /**\n+     * Represents the value as duration in human readable format.\n+     * @param DateInterval|string|integer $value the value to be formatted. Acceptable formats:\n+     *  - [DateInterval object](http://php.net/manual/ru/class.dateinterval.php)\n+     *  - integer - number of seconds. For example: value `131` represents `2 minutes, 11 seconds`\n+     *  - ISO8601 duration format. For example, all of these values represent `1 day, 2 hours, 30 minutes` duration:\n+     *    `2015-01-01T13:00:00Z/2015-01-02T13:30:00Z` - between two datetime values\n+     *    `2015-01-01T13:00:00Z/P1D2H30M` - time interval after datetime value\n+     *    `P1D2H30M/2015-01-02T13:30:00Z` - time interval before datetime value\n+     *    `P1D2H30M` - simply a date interval\n+     *    `P-1D2H30M` - a negative date interval (`-1 day, 2 hours, 30 minutes`)\n+     * @param array $options The parameter of human readable format string. Includes:\n+     *    - `string` `implodeString` will be used to concatenate duration parts. Defaults to `, `.\n+     *    - `string` `negativeSign` will be prefixed to the formatted duration, when it is negative. Defaults to `-`.\n+     *    - `null|true|false` `showSeconds` will be displayed  part for seconds data. Default is null that means is\n+     *      seconds data is displayed if not equals 0 value. To set `true` if you want display any value of parts always.\n+     *      False - never display a part.\n+     *    - `null|true|false` `showMinutes` will be displayed part for minutes data. Behaves like as `showSeconds`.\n+     *    - `null|true|false` `showHours` will be displayed part for hours data. Behaves like as `showSeconds`.\n+     *    - `null|true|false` `showDays` will be displayed part for days data. Behaves like as `showSeconds`.\n+     *    - `null|true|false` `showMonths` will be displayed part for months data. Behaves like as `showSeconds`.\n+     *    - `null|true|false` `showYears` will be displayed part for years data. Behaves like as `showSeconds`.\n+     * Note that if `value` parameter equals zero value, will be displayed `0 seconds`, if `showSeconds` not `false`.\n+     * And if `showYears` is `false` that is mean low priority parts(`showMonths`, `showDays`, `showDays`, ...) will be\n+     * set to false also.\n+     * @return string the formatted duration.\n+     * @since 2.0.10\n+     */\n+    public function asDurationTime($value, $options = [])\n+    {\n+        if (is_null($value)) {","path":"framework/i18n/Formatter.php","position":64,"original_position":64,"commit_id":"94088059c06b8ba38b7212d8c31c49f1ad2df267","original_commit_id":"94088059c06b8ba38b7212d8c31c49f1ad2df267","user":{"login":"samdark","id":47294,"avatar_url":"https://avatars.githubusercontent.com/u/47294?v=3","gravatar_id":"","url":"https://api.github.com/users/samdark","html_url":"https://github.com/samdark","followers_url":"https://api.github.com/users/samdark/followers","following_url":"https://api.github.com/users/samdark/following{/other_user}","gists_url":"https://api.github.com/users/samdark/gists{/gist_id}","starred_url":"https://api.github.com/users/samdark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samdark/subscriptions","organizations_url":"https://api.github.com/users/samdark/orgs","repos_url":"https://api.github.com/users/samdark/repos","events_url":"https://api.github.com/users/samdark/events{/privacy}","received_events_url":"https://api.github.com/users/samdark/received_events","type":"User","site_admin":false},"body":"`=== null` should be used instead of `is_null`","created_at":"2016-10-04T09:26:01Z","updated_at":"2016-10-04T09:26:54Z","html_url":"https://github.com/yiisoft/yii2/pull/12660#discussion_r81717680","pull_request_url":"https://api.github.com/repos/yiisoft/yii2/pulls/12660","_links":{"self":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/comments/81717680"},"html":{"href":"https://github.com/yiisoft/yii2/pull/12660#discussion_r81717680"},"pull_request":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/12660"}}},"pull_request":{"url":"https://api.github.com/repos/yiisoft/yii2/pulls/12660","id":87839241,"html_url":"https://github.com/yiisoft/yii2/pull/12660","diff_url":"https://github.com/yiisoft/yii2/pull/12660.diff","patch_url":"https://github.com/yiisoft/yii2/pull/12660.patch","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/12660","number":12660,"state":"open","locked":false,"title":"Added `\\yii\\i18n\\Formatter::asDurationTime()`","user":{"login":"githubjeka","id":874234,"avatar_url":"https://avatars.githubusercontent.com/u/874234?v=3","gravatar_id":"","url":"https://api.github.com/users/githubjeka","html_url":"https://github.com/githubjeka","followers_url":"https://api.github.com/users/githubjeka/followers","following_url":"https://api.github.com/users/githubjeka/following{/other_user}","gists_url":"https://api.github.com/users/githubjeka/gists{/gist_id}","starred_url":"https://api.github.com/users/githubjeka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/githubjeka/subscriptions","organizations_url":"https://api.github.com/users/githubjeka/orgs","repos_url":"https://api.github.com/users/githubjeka/repos","events_url":"https://api.github.com/users/githubjeka/events{/privacy}","received_events_url":"https://api.github.com/users/githubjeka/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Is bugfix?    | no\r\n| New feature?  | yes\r\n| Breaks BC?    | no\r\n| Tests pass?   | yes\r\n| Fixed issues  |  #12022 fixed by the PR\r\n\r\n","created_at":"2016-10-04T06:35:27Z","updated_at":"2016-10-04T09:26:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fbed0c971dfa0589751aab9600f232a272288c0f","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/yiisoft/yii2/milestones/20","html_url":"https://github.com/yiisoft/yii2/milestones/2.0.11","labels_url":"https://api.github.com/repos/yiisoft/yii2/milestones/20/labels","id":1736699,"number":20,"title":"2.0.11","description":"","creator":{"login":"cebe","id":189796,"avatar_url":"https://avatars.githubusercontent.com/u/189796?v=3","gravatar_id":"","url":"https://api.github.com/users/cebe","html_url":"https://github.com/cebe","followers_url":"https://api.github.com/users/cebe/followers","following_url":"https://api.github.com/users/cebe/following{/other_user}","gists_url":"https://api.github.com/users/cebe/gists{/gist_id}","starred_url":"https://api.github.com/users/cebe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cebe/subscriptions","organizations_url":"https://api.github.com/users/cebe/orgs","repos_url":"https://api.github.com/users/cebe/repos","events_url":"https://api.github.com/users/cebe/events{/privacy}","received_events_url":"https://api.github.com/users/cebe/received_events","type":"User","site_admin":false},"open_issues":46,"closed_issues":0,"state":"open","created_at":"2016-04-28T15:04:50Z","updated_at":"2016-10-04T07:31:57Z","due_on":"2016-11-12T23:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/yiisoft/yii2/pulls/12660/commits","review_comments_url":"https://api.github.com/repos/yiisoft/yii2/pulls/12660/comments","review_comment_url":"https://api.github.com/repos/yiisoft/yii2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/12660/comments","statuses_url":"https://api.github.com/repos/yiisoft/yii2/statuses/94088059c06b8ba38b7212d8c31c49f1ad2df267","head":{"label":"githubjeka:issue-12022","ref":"issue-12022","sha":"94088059c06b8ba38b7212d8c31c49f1ad2df267","user":{"login":"githubjeka","id":874234,"avatar_url":"https://avatars.githubusercontent.com/u/874234?v=3","gravatar_id":"","url":"https://api.github.com/users/githubjeka","html_url":"https://github.com/githubjeka","followers_url":"https://api.github.com/users/githubjeka/followers","following_url":"https://api.github.com/users/githubjeka/following{/other_user}","gists_url":"https://api.github.com/users/githubjeka/gists{/gist_id}","starred_url":"https://api.github.com/users/githubjeka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/githubjeka/subscriptions","organizations_url":"https://api.github.com/users/githubjeka/orgs","repos_url":"https://api.github.com/users/githubjeka/repos","events_url":"https://api.github.com/users/githubjeka/events{/privacy}","received_events_url":"https://api.github.com/users/githubjeka/received_events","type":"User","site_admin":false},"repo":{"id":21036114,"name":"yii2","full_name":"githubjeka/yii2","owner":{"login":"githubjeka","id":874234,"avatar_url":"https://avatars.githubusercontent.com/u/874234?v=3","gravatar_id":"","url":"https://api.github.com/users/githubjeka","html_url":"https://github.com/githubjeka","followers_url":"https://api.github.com/users/githubjeka/followers","following_url":"https://api.github.com/users/githubjeka/following{/other_user}","gists_url":"https://api.github.com/users/githubjeka/gists{/gist_id}","starred_url":"https://api.github.com/users/githubjeka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/githubjeka/subscriptions","organizations_url":"https://api.github.com/users/githubjeka/orgs","repos_url":"https://api.github.com/users/githubjeka/repos","events_url":"https://api.github.com/users/githubjeka/events{/privacy}","received_events_url":"https://api.github.com/users/githubjeka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/githubjeka/yii2","description":"Yii 2 framework main development repo","fork":true,"url":"https://api.github.com/repos/githubjeka/yii2","forks_url":"https://api.github.com/repos/githubjeka/yii2/forks","keys_url":"https://api.github.com/repos/githubjeka/yii2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/githubjeka/yii2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/githubjeka/yii2/teams","hooks_url":"https://api.github.com/repos/githubjeka/yii2/hooks","issue_events_url":"https://api.github.com/repos/githubjeka/yii2/issues/events{/number}","events_url":"https://api.github.com/repos/githubjeka/yii2/events","assignees_url":"https://api.github.com/repos/githubjeka/yii2/assignees{/user}","branches_url":"https://api.github.com/repos/githubjeka/yii2/branches{/branch}","tags_url":"https://api.github.com/repos/githubjeka/yii2/tags","blobs_url":"https://api.github.com/repos/githubjeka/yii2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/githubjeka/yii2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/githubjeka/yii2/git/refs{/sha}","trees_url":"https://api.github.com/repos/githubjeka/yii2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/githubjeka/yii2/statuses/{sha}","languages_url":"https://api.github.com/repos/githubjeka/yii2/languages","stargazers_url":"https://api.github.com/repos/githubjeka/yii2/stargazers","contributors_url":"https://api.github.com/repos/githubjeka/yii2/contributors","subscribers_url":"https://api.github.com/repos/githubjeka/yii2/subscribers","subscription_url":"https://api.github.com/repos/githubjeka/yii2/subscription","commits_url":"https://api.github.com/repos/githubjeka/yii2/commits{/sha}","git_commits_url":"https://api.github.com/repos/githubjeka/yii2/git/commits{/sha}","comments_url":"https://api.github.com/repos/githubjeka/yii2/comments{/number}","issue_comment_url":"https://api.github.com/repos/githubjeka/yii2/issues/comments{/number}","contents_url":"https://api.github.com/repos/githubjeka/yii2/contents/{+path}","compare_url":"https://api.github.com/repos/githubjeka/yii2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/githubjeka/yii2/merges","archive_url":"https://api.github.com/repos/githubjeka/yii2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/githubjeka/yii2/downloads","issues_url":"https://api.github.com/repos/githubjeka/yii2/issues{/number}","pulls_url":"https://api.github.com/repos/githubjeka/yii2/pulls{/number}","milestones_url":"https://api.github.com/repos/githubjeka/yii2/milestones{/number}","notifications_url":"https://api.github.com/repos/githubjeka/yii2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/githubjeka/yii2/labels{/name}","releases_url":"https://api.github.com/repos/githubjeka/yii2/releases{/id}","deployments_url":"https://api.github.com/repos/githubjeka/yii2/deployments","created_at":"2014-06-20T11:47:58Z","updated_at":"2015-06-02T11:54:32Z","pushed_at":"2016-10-04T09:15:16Z","git_url":"git://github.com/githubjeka/yii2.git","ssh_url":"git@github.com:githubjeka/yii2.git","clone_url":"https://github.com/githubjeka/yii2.git","svn_url":"https://github.com/githubjeka/yii2","homepage":"http://www.yiiframework.com","size":39936,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"yiisoft:master","ref":"master","sha":"32f42e3fa608bd76edf20c180427e52cb80ca4ce","user":{"login":"yiisoft","id":993323,"avatar_url":"https://avatars.githubusercontent.com/u/993323?v=3","gravatar_id":"","url":"https://api.github.com/users/yiisoft","html_url":"https://github.com/yiisoft","followers_url":"https://api.github.com/users/yiisoft/followers","following_url":"https://api.github.com/users/yiisoft/following{/other_user}","gists_url":"https://api.github.com/users/yiisoft/gists{/gist_id}","starred_url":"https://api.github.com/users/yiisoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yiisoft/subscriptions","organizations_url":"https://api.github.com/users/yiisoft/orgs","repos_url":"https://api.github.com/users/yiisoft/repos","events_url":"https://api.github.com/users/yiisoft/events{/privacy}","received_events_url":"https://api.github.com/users/yiisoft/received_events","type":"Organization","site_admin":false},"repo":{"id":3431193,"name":"yii2","full_name":"yiisoft/yii2","owner":{"login":"yiisoft","id":993323,"avatar_url":"https://avatars.githubusercontent.com/u/993323?v=3","gravatar_id":"","url":"https://api.github.com/users/yiisoft","html_url":"https://github.com/yiisoft","followers_url":"https://api.github.com/users/yiisoft/followers","following_url":"https://api.github.com/users/yiisoft/following{/other_user}","gists_url":"https://api.github.com/users/yiisoft/gists{/gist_id}","starred_url":"https://api.github.com/users/yiisoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yiisoft/subscriptions","organizations_url":"https://api.github.com/users/yiisoft/orgs","repos_url":"https://api.github.com/users/yiisoft/repos","events_url":"https://api.github.com/users/yiisoft/events{/privacy}","received_events_url":"https://api.github.com/users/yiisoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yiisoft/yii2","description":"Yii 2 framework main development repo","fork":false,"url":"https://api.github.com/repos/yiisoft/yii2","forks_url":"https://api.github.com/repos/yiisoft/yii2/forks","keys_url":"https://api.github.com/repos/yiisoft/yii2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yiisoft/yii2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yiisoft/yii2/teams","hooks_url":"https://api.github.com/repos/yiisoft/yii2/hooks","issue_events_url":"https://api.github.com/repos/yiisoft/yii2/issues/events{/number}","events_url":"https://api.github.com/repos/yiisoft/yii2/events","assignees_url":"https://api.github.com/repos/yiisoft/yii2/assignees{/user}","branches_url":"https://api.github.com/repos/yiisoft/yii2/branches{/branch}","tags_url":"https://api.github.com/repos/yiisoft/yii2/tags","blobs_url":"https://api.github.com/repos/yiisoft/yii2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yiisoft/yii2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yiisoft/yii2/git/refs{/sha}","trees_url":"https://api.github.com/repos/yiisoft/yii2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yiisoft/yii2/statuses/{sha}","languages_url":"https://api.github.com/repos/yiisoft/yii2/languages","stargazers_url":"https://api.github.com/repos/yiisoft/yii2/stargazers","contributors_url":"https://api.github.com/repos/yiisoft/yii2/contributors","subscribers_url":"https://api.github.com/repos/yiisoft/yii2/subscribers","subscription_url":"https://api.github.com/repos/yiisoft/yii2/subscription","commits_url":"https://api.github.com/repos/yiisoft/yii2/commits{/sha}","git_commits_url":"https://api.github.com/repos/yiisoft/yii2/git/commits{/sha}","comments_url":"https://api.github.com/repos/yiisoft/yii2/comments{/number}","issue_comment_url":"https://api.github.com/repos/yiisoft/yii2/issues/comments{/number}","contents_url":"https://api.github.com/repos/yiisoft/yii2/contents/{+path}","compare_url":"https://api.github.com/repos/yiisoft/yii2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yiisoft/yii2/merges","archive_url":"https://api.github.com/repos/yiisoft/yii2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yiisoft/yii2/downloads","issues_url":"https://api.github.com/repos/yiisoft/yii2/issues{/number}","pulls_url":"https://api.github.com/repos/yiisoft/yii2/pulls{/number}","milestones_url":"https://api.github.com/repos/yiisoft/yii2/milestones{/number}","notifications_url":"https://api.github.com/repos/yiisoft/yii2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yiisoft/yii2/labels{/name}","releases_url":"https://api.github.com/repos/yiisoft/yii2/releases{/id}","deployments_url":"https://api.github.com/repos/yiisoft/yii2/deployments","created_at":"2012-02-13T15:32:36Z","updated_at":"2016-10-03T14:54:12Z","pushed_at":"2016-10-04T09:15:23Z","git_url":"git://github.com/yiisoft/yii2.git","ssh_url":"git@github.com:yiisoft/yii2.git","clone_url":"https://github.com/yiisoft/yii2.git","svn_url":"https://github.com/yiisoft/yii2","homepage":"http://www.yiiframework.com","size":63530,"stargazers_count":8818,"watchers_count":8818,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5128,"mirror_url":null,"open_issues_count":947,"forks":5128,"open_issues":947,"watchers":8818,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/12660"},"html":{"href":"https://github.com/yiisoft/yii2/pull/12660"},"issue":{"href":"https://api.github.com/repos/yiisoft/yii2/issues/12660"},"comments":{"href":"https://api.github.com/repos/yiisoft/yii2/issues/12660/comments"},"review_comments":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/12660/comments"},"review_comment":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yiisoft/yii2/pulls/12660/commits"},"statuses":{"href":"https://api.github.com/repos/yiisoft/yii2/statuses/94088059c06b8ba38b7212d8c31c49f1ad2df267"}}}}
{"actor":{"display_login":"samdark"}}