GitHub PullRequestReviewCommentEvent at 2014-01-28 21:29:41
Repository: swat
Actor: gauthierm
Payload: {"comment":{"url":"https://api.github.com/repos/silverorange/swat/pulls/comments/9245616","id":9245616,"diff_hunk":"@@ -1351,6 +1351,140 @@ public static function toList($iterator, $conjunction = 'and',\n \t\treturn $list;\n \t}\n \t// }}}\n+\t// {{{ public static function getHumanReadableTimePeriodParts()\n+\n+\t/**\n+\t * Gets the parts to construct a human-readable string representing a time period.\n+\t *\n+\t * This method formats seconds as a time period. Given an example value\n+\t * of 161740805, the following key=>value array is returned.\n+\t * <code>\n+\t * <?php\n+\t * array(\n+\t *    'years'   => '5 years',\n+\t *    'months'  => '3 months',\n+\t *    'days'    => '2 days',\n+\t *    'seconds' => '5 seconds',\n+\t * );\n+\t * ?>\n+\t * </code>\n+\t *\n+\t * As this method applies on seconds, no time zone considerations are\n+\t * made. Years are assumed to be 365 days. Months are assumed to be 30\n+\t * 30 days.\n+\t *\n+\t * @param integer $seconds seconds to format.\n+\t * @param integer $interval_parts inclusive or bitwise set of parts to return.\n+\t *\n+\t * @return array An array of human-readable time period string parts.\n+\t */\n+\tpublic static function getHumanReadableTimePeriodParts($seconds,\n+\t\t$interval_parts = null)\n+\t{\n+\t\t$interval = SwatDate::getIntervalFromSeconds($seconds);\n+\n+\t\tif ($interval_parts == '') {","path":"Swat/SwatString.php","position":45,"original_position":45,"commit_id":"c1f0c0bb576e3eddd96f8e3b01b8889bf70fe2cd","original_commit_id":"c1f0c0bb576e3eddd96f8e3b01b8889bf70fe2cd","user":{"login":"gauthierm","id":120511,"avatar_url":"https://gravatar.com/avatar/26e679b0cb3411bbedbba66ca6db1cad?d=https%3A%2F%2Fidenticons.github.com%2Fc8bfec2cf39327656c17f6b7df80432b.png&r=x","gravatar_id":"26e679b0cb3411bbedbba66ca6db1cad","url":"https://api.github.com/users/gauthierm","html_url":"https://github.com/gauthierm","followers_url":"https://api.github.com/users/gauthierm/followers","following_url":"https://api.github.com/users/gauthierm/following{/other_user}","gists_url":"https://api.github.com/users/gauthierm/gists{/gist_id}","starred_url":"https://api.github.com/users/gauthierm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gauthierm/subscriptions","organizations_url":"https://api.github.com/users/gauthierm/orgs","repos_url":"https://api.github.com/users/gauthierm/repos","events_url":"https://api.github.com/users/gauthierm/events{/privacy}","received_events_url":"https://api.github.com/users/gauthierm/received_events","type":"User","site_admin":false},"body":"Check `=== null` here since `$interval_parts` is a bitwise integer field.","created_at":"2014-01-28T21:29:41Z","updated_at":"2014-01-28T21:29:41Z","html_url":"https://github.com/silverorange/swat/pull/16#discussion_r9245616","pull_request_url":"https://api.github.com/repos/silverorange/swat/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/silverorange/swat/pulls/comments/9245616"},"html":{"href":"https://github.com/silverorange/swat/pull/16#discussion_r9245616"},"pull_request":{"href":"https://api.github.com/repos/silverorange/swat/pulls/16"}}}}