{"action":"closed","number":42,"pull_request":{"url":"https://api.github.com/repos/samsonjs/strftime/pulls/42","id":17515254,"html_url":"https://github.com/samsonjs/strftime/pull/42","diff_url":"https://github.com/samsonjs/strftime/pull/42.diff","patch_url":"https://github.com/samsonjs/strftime/pull/42.patch","issue_url":"https://api.github.com/repos/samsonjs/strftime/issues/42","number":42,"state":"closed","locked":false,"title":"v0.9 rewrite - all about API and performance","user":{"login":"samsonjs","id":32487,"avatar_url":"https://avatars.githubusercontent.com/u/32487?v=3","gravatar_id":"","url":"https://api.github.com/users/samsonjs","html_url":"https://github.com/samsonjs","followers_url":"https://api.github.com/users/samsonjs/followers","following_url":"https://api.github.com/users/samsonjs/following{/other_user}","gists_url":"https://api.github.com/users/samsonjs/gists{/gist_id}","starred_url":"https://api.github.com/users/samsonjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samsonjs/subscriptions","organizations_url":"https://api.github.com/users/samsonjs/orgs","repos_url":"https://api.github.com/users/samsonjs/repos","events_url":"https://api.github.com/users/samsonjs/events{/privacy}","received_events_url":"https://api.github.com/users/samsonjs/received_events","type":"User","site_admin":false},"body":"This pull request will form the basis of v0.9. It's based on @alexandrnikitin's pull request (#41) which rewrites most of the code to [greatly improve performance](http://jsperf.com/strftime-optimization) and cleans up the sprawling API as well.\r\n\r\n@alexandrnikitin's original pull request is quoted below:\r\n\r\nHi all,\r\n\r\nI want to initiate a discussion/review. I've made work on performance optimization. It gives ~20x boost in tests with defined date and ~10x with current date on Node.js. http://jsperf.com/strftime-optimization\r\nI changed the API (#29) which looks like:\r\n\r\n```javascript\r\n    // by default\r\n    var strftime = require('../strftimeV2');\r\n    var strftimeLocalized = require('../strftimeV2').setLocaleTo(it_IT);\r\n    var strftimeWithCustomTimezone = require('../strftimeV2').setTimezoneTo(customTimezone);\r\n    var strftimeUTC = require('../strftimeV2').useUTC();\r\n     var strftimeLocalizedUTC = require('../strftimeV2').setLocaleTo(it_IT).useUTC();\r\n\r\n    strftime('%A');\r\n    strftimeLocalized('%A');\r\n    // etc\r\n```\r\n\r\nI rewrote almost all the code from scratch but it is pretty simple and easy to read. I adapted tests to new API but they need refactoring. Please spend some time to review the code. Looking forward to your feedback.","created_at":"2014-06-24T06:46:22Z","updated_at":"2015-03-06T00:59:05Z","closed_at":"2015-03-06T00:59:05Z","merged_at":"2015-03-06T00:59:05Z","merge_commit_sha":"c82306a2e545af0a744f1efbef2c981a7957c2ad","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/samsonjs/strftime/pulls/42/commits","review_comments_url":"https://api.github.com/repos/samsonjs/strftime/pulls/42/comments","review_comment_url":"https://api.github.com/repos/samsonjs/strftime/pulls/comments{/number}","comments_url":"https://api.github.com/repos/samsonjs/strftime/issues/42/comments","statuses_url":"https://api.github.com/repos/samsonjs/strftime/statuses/e631d8120665666659729c80adcd797df68d7dd6","head":{"label":"samsonjs:v0.9","ref":"v0.9","sha":"e631d8120665666659729c80adcd797df68d7dd6","user":{"login":"samsonjs","id":32487,"avatar_url":"https://avatars.githubusercontent.com/u/32487?v=3","gravatar_id":"","url":"https://api.github.com/users/samsonjs","html_url":"https://github.com/samsonjs","followers_url":"https://api.github.com/users/samsonjs/followers","following_url":"https://api.github.com/users/samsonjs/following{/other_user}","gists_url":"https://api.github.com/users/samsonjs/gists{/gist_id}","starred_url":"https://api.github.com/users/samsonjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samsonjs/subscriptions","organizations_url":"https://api.github.com/users/samsonjs/orgs","repos_url":"https://api.github.com/users/samsonjs/repos","events_url":"https://api.github.com/users/samsonjs/events{/privacy}","received_events_url":"https://api.github.com/users/samsonjs/received_events","type":"User","site_admin":false},"repo":{"id":1072788,"name":"strftime","full_name":"samsonjs/strftime","owner":{"login":"samsonjs","id":32487,"avatar_url":"https://avatars.githubusercontent.com/u/32487?v=3","gravatar_id":"","url":"https://api.github.com/users/samsonjs","html_url":"https://github.com/samsonjs","followers_url":"https://api.github.com/users/samsonjs/followers","following_url":"https://api.github.com/users/samsonjs/following{/other_user}","gists_url":"https://api.github.com/users/samsonjs/gists{/gist_id}","starred_url":"https://api.github.com/users/samsonjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samsonjs/subscriptions","organizations_url":"https://api.github.com/users/samsonjs/orgs","repos_url":"https://api.github.com/users/samsonjs/repos","events_url":"https://api.github.com/users/samsonjs/events{/privacy}","received_events_url":"https://api.github.com/users/samsonjs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/samsonjs/strftime","description":"strftime for JavaScript","fork":false,"url":"https://api.github.com/repos/samsonjs/strftime","forks_url":"https://api.github.com/repos/samsonjs/strftime/forks","keys_url":"https://api.github.com/repos/samsonjs/strftime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samsonjs/strftime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samsonjs/strftime/teams","hooks_url":"https://api.github.com/repos/samsonjs/strftime/hooks","issue_events_url":"https://api.github.com/repos/samsonjs/strftime/issues/events{/number}","events_url":"https://api.github.com/repos/samsonjs/strftime/events","assignees_url":"https://api.github.com/repos/samsonjs/strftime/assignees{/user}","branches_url":"https://api.github.com/repos/samsonjs/strftime/branches{/branch}","tags_url":"https://api.github.com/repos/samsonjs/strftime/tags","blobs_url":"https://api.github.com/repos/samsonjs/strftime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samsonjs/strftime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samsonjs/strftime/git/refs{/sha}","trees_url":"https://api.github.com/repos/samsonjs/strftime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samsonjs/strftime/statuses/{sha}","languages_url":"https://api.github.com/repos/samsonjs/strftime/languages","stargazers_url":"https://api.github.com/repos/samsonjs/strftime/stargazers","contributors_url":"https://api.github.com/repos/samsonjs/strftime/contributors","subscribers_url":"https://api.github.com/repos/samsonjs/strftime/subscribers","subscription_url":"https://api.github.com/repos/samsonjs/strftime/subscription","commits_url":"https://api.github.com/repos/samsonjs/strftime/commits{/sha}","git_commits_url":"https://api.github.com/repos/samsonjs/strftime/git/commits{/sha}","comments_url":"https://api.github.com/repos/samsonjs/strftime/comments{/number}","issue_comment_url":"https://api.github.com/repos/samsonjs/strftime/issues/comments{/number}","contents_url":"https://api.github.com/repos/samsonjs/strftime/contents/{+path}","compare_url":"https://api.github.com/repos/samsonjs/strftime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samsonjs/strftime/merges","archive_url":"https://api.github.com/repos/samsonjs/strftime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samsonjs/strftime/downloads","issues_url":"https://api.github.com/repos/samsonjs/strftime/issues{/number}","pulls_url":"https://api.github.com/repos/samsonjs/strftime/pulls{/number}","milestones_url":"https://api.github.com/repos/samsonjs/strftime/milestones{/number}","notifications_url":"https://api.github.com/repos/samsonjs/strftime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samsonjs/strftime/labels{/name}","releases_url":"https://api.github.com/repos/samsonjs/strftime/releases{/id}","created_at":"2010-11-11T21:17:25Z","updated_at":"2015-03-06T00:59:05Z","pushed_at":"2015-03-06T00:59:05Z","git_url":"git://github.com/samsonjs/strftime.git","ssh_url":"git@github.com:samsonjs/strftime.git","clone_url":"https://github.com/samsonjs/strftime.git","svn_url":"https://github.com/samsonjs/strftime","homepage":"http://samhuri.net/projects/strftime","size":459,"stargazers_count":218,"watchers_count":218,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":68,"mirror_url":null,"open_issues_count":2,"forks":68,"open_issues":2,"watchers":218,"default_branch":"master"}},"base":{"label":"samsonjs:master","ref":"master","sha":"49568677a7b24712308f52bef953094de7171bf5","user":{"login":"samsonjs","id":32487,"avatar_url":"https://avatars.githubusercontent.com/u/32487?v=3","gravatar_id":"","url":"https://api.github.com/users/samsonjs","html_url":"https://github.com/samsonjs","followers_url":"https://api.github.com/users/samsonjs/followers","following_url":"https://api.github.com/users/samsonjs/following{/other_user}","gists_url":"https://api.github.com/users/samsonjs/gists{/gist_id}","starred_url":"https://api.github.com/users/samsonjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samsonjs/subscriptions","organizations_url":"https://api.github.com/users/samsonjs/orgs","repos_url":"https://api.github.com/users/samsonjs/repos","events_url":"https://api.github.com/users/samsonjs/events{/privacy}","received_events_url":"https://api.github.com/users/samsonjs/received_events","type":"User","site_admin":false},"repo":{"id":1072788,"name":"strftime","full_name":"samsonjs/strftime","owner":{"login":"samsonjs","id":32487,"avatar_url":"https://avatars.githubusercontent.com/u/32487?v=3","gravatar_id":"","url":"https://api.github.com/users/samsonjs","html_url":"https://github.com/samsonjs","followers_url":"https://api.github.com/users/samsonjs/followers","following_url":"https://api.github.com/users/samsonjs/following{/other_user}","gists_url":"https://api.github.com/users/samsonjs/gists{/gist_id}","starred_url":"https://api.github.com/users/samsonjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samsonjs/subscriptions","organizations_url":"https://api.github.com/users/samsonjs/orgs","repos_url":"https://api.github.com/users/samsonjs/repos","events_url":"https://api.github.com/users/samsonjs/events{/privacy}","received_events_url":"https://api.github.com/users/samsonjs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/samsonjs/strftime","description":"strftime for JavaScript","fork":false,"url":"https://api.github.com/repos/samsonjs/strftime","forks_url":"https://api.github.com/repos/samsonjs/strftime/forks","keys_url":"https://api.github.com/repos/samsonjs/strftime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samsonjs/strftime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samsonjs/strftime/teams","hooks_url":"https://api.github.com/repos/samsonjs/strftime/hooks","issue_events_url":"https://api.github.com/repos/samsonjs/strftime/issues/events{/number}","events_url":"https://api.github.com/repos/samsonjs/strftime/events","assignees_url":"https://api.github.com/repos/samsonjs/strftime/assignees{/user}","branches_url":"https://api.github.com/repos/samsonjs/strftime/branches{/branch}","tags_url":"https://api.github.com/repos/samsonjs/strftime/tags","blobs_url":"https://api.github.com/repos/samsonjs/strftime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samsonjs/strftime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samsonjs/strftime/git/refs{/sha}","trees_url":"https://api.github.com/repos/samsonjs/strftime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samsonjs/strftime/statuses/{sha}","languages_url":"https://api.github.com/repos/samsonjs/strftime/languages","stargazers_url":"https://api.github.com/repos/samsonjs/strftime/stargazers","contributors_url":"https://api.github.com/repos/samsonjs/strftime/contributors","subscribers_url":"https://api.github.com/repos/samsonjs/strftime/subscribers","subscription_url":"https://api.github.com/repos/samsonjs/strftime/subscription","commits_url":"https://api.github.com/repos/samsonjs/strftime/commits{/sha}","git_commits_url":"https://api.github.com/repos/samsonjs/strftime/git/commits{/sha}","comments_url":"https://api.github.com/repos/samsonjs/strftime/comments{/number}","issue_comment_url":"https://api.github.com/repos/samsonjs/strftime/issues/comments{/number}","contents_url":"https://api.github.com/repos/samsonjs/strftime/contents/{+path}","compare_url":"https://api.github.com/repos/samsonjs/strftime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samsonjs/strftime/merges","archive_url":"https://api.github.com/repos/samsonjs/strftime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samsonjs/strftime/downloads","issues_url":"https://api.github.com/repos/samsonjs/strftime/issues{/number}","pulls_url":"https://api.github.com/repos/samsonjs/strftime/pulls{/number}","milestones_url":"https://api.github.com/repos/samsonjs/strftime/milestones{/number}","notifications_url":"https://api.github.com/repos/samsonjs/strftime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samsonjs/strftime/labels{/name}","releases_url":"https://api.github.com/repos/samsonjs/strftime/releases{/id}","created_at":"2010-11-11T21:17:25Z","updated_at":"2015-03-06T00:59:05Z","pushed_at":"2015-03-06T00:59:05Z","git_url":"git://github.com/samsonjs/strftime.git","ssh_url":"git@github.com:samsonjs/strftime.git","clone_url":"https://github.com/samsonjs/strftime.git","svn_url":"https://github.com/samsonjs/strftime","homepage":"http://samhuri.net/projects/strftime","size":459,"stargazers_count":218,"watchers_count":218,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":68,"mirror_url":null,"open_issues_count":2,"forks":68,"open_issues":2,"watchers":218,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/samsonjs/strftime/pulls/42"},"html":{"href":"https://github.com/samsonjs/strftime/pull/42"},"issue":{"href":"https://api.github.com/repos/samsonjs/strftime/issues/42"},"comments":{"href":"https://api.github.com/repos/samsonjs/strftime/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/samsonjs/strftime/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/samsonjs/strftime/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/samsonjs/strftime/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/samsonjs/strftime/statuses/e631d8120665666659729c80adcd797df68d7dd6"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"samsonjs","id":32487,"avatar_url":"https://avatars.githubusercontent.com/u/32487?v=3","gravatar_id":"","url":"https://api.github.com/users/samsonjs","html_url":"https://github.com/samsonjs","followers_url":"https://api.github.com/users/samsonjs/followers","following_url":"https://api.github.com/users/samsonjs/following{/other_user}","gists_url":"https://api.github.com/users/samsonjs/gists{/gist_id}","starred_url":"https://api.github.com/users/samsonjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samsonjs/subscriptions","organizations_url":"https://api.github.com/users/samsonjs/orgs","repos_url":"https://api.github.com/users/samsonjs/repos","events_url":"https://api.github.com/users/samsonjs/events{/privacy}","received_events_url":"https://api.github.com/users/samsonjs/received_events","type":"User","site_admin":false},"comments":8,"review_comments":0,"commits":10,"additions":763,"deletions":558,"changed_files":5}}