{"action":"created","comment":{"url":"https://api.github.com/repos/navikt/foreldrepengesoknad/pulls/comments/208535301","pull_request_review_id":144361674,"id":208535301,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwODUzNTMwMQ==","diff_hunk":"@@ -0,0 +1,28 @@\n+import DateValues from '../values';\n+import { Tidsperiode, Avgrensninger } from 'nav-datovelger';\n+import { DatoAvgrensninger } from '../../../bolker/TidsperiodeBolk';\n+\n+export const getAndreInntekterTidsperiodeAvgrensninger = (\n+    tidsperiode?: Partial<Tidsperiode>\n+): DatoAvgrensninger => {\n+    return {\n+        fra: {\n+            minDato: undefined,\n+            maksDato: DateValues.today.toDate()\n+        },\n+        til: {\n+            minDato:\n+                tidsperiode && tidsperiode.fom ? tidsperiode.fom : undefined,\n+            maksDato: DateValues.today.toDate()\n+        }\n+    };\n+};\n+\n+export const getTidsperiodeAvgrensningerSiste4år = (): Avgrensninger => {\n+    const maksDato = DateValues.today.toDate();\n+    const minDato = DateValues.today.subtract(4, 'years').toDate();","path":"src/app/util/validation/fields/andreInntekter.ts","position":23,"original_position":23,"commit_id":"1991b29e1512a27c61b896d251233d62f3dc6ca6","original_commit_id":"1991b29e1512a27c61b896d251233d62f3dc6ca6","user":{"login":"erlendev","id":1488626,"node_id":"MDQ6VXNlcjE0ODg2MjY=","avatar_url":"https://avatars1.githubusercontent.com/u/1488626?v=4","gravatar_id":"","url":"https://api.github.com/users/erlendev","html_url":"https://github.com/erlendev","followers_url":"https://api.github.com/users/erlendev/followers","following_url":"https://api.github.com/users/erlendev/following{/other_user}","gists_url":"https://api.github.com/users/erlendev/gists{/gist_id}","starred_url":"https://api.github.com/users/erlendev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erlendev/subscriptions","organizations_url":"https://api.github.com/users/erlendev/orgs","repos_url":"https://api.github.com/users/erlendev/repos","events_url":"https://api.github.com/users/erlendev/events{/privacy}","received_events_url":"https://api.github.com/users/erlendev/received_events","type":"User","site_admin":false},"body":"Denne burde kanskje lages som en `date4YearsAgo`-const i `values.ts`? Da tror jeg du slipper den `DateValues`-saken også, siden moment-datoen ikke endres ved bruk av `toDate()`. Koden her vil også bli mer behagelig å teste.","created_at":"2018-08-08T10:43:15Z","updated_at":"2018-08-08T10:43:53Z","html_url":"https://github.com/navikt/foreldrepengesoknad/pull/147#discussion_r208535301","pull_request_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/pulls/147","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/navikt/foreldrepengesoknad/pulls/comments/208535301"},"html":{"href":"https://github.com/navikt/foreldrepengesoknad/pull/147#discussion_r208535301"},"pull_request":{"href":"https://api.github.com/repos/navikt/foreldrepengesoknad/pulls/147"}}},"pull_request":{"url":"https://api.github.com/repos/navikt/foreldrepengesoknad/pulls/147","id":206963408,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2OTYzNDA4","html_url":"https://github.com/navikt/foreldrepengesoknad/pull/147","diff_url":"https://github.com/navikt/foreldrepengesoknad/pull/147.diff","patch_url":"https://github.com/navikt/foreldrepengesoknad/pull/147.patch","issue_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/issues/147","number":147,"state":"open","locked":false,"title":"Add range limits for calendars in Andre inntekter","user":{"login":"frodehansen2","id":462494,"node_id":"MDQ6VXNlcjQ2MjQ5NA==","avatar_url":"https://avatars1.githubusercontent.com/u/462494?v=4","gravatar_id":"","url":"https://api.github.com/users/frodehansen2","html_url":"https://github.com/frodehansen2","followers_url":"https://api.github.com/users/frodehansen2/followers","following_url":"https://api.github.com/users/frodehansen2/following{/other_user}","gists_url":"https://api.github.com/users/frodehansen2/gists{/gist_id}","starred_url":"https://api.github.com/users/frodehansen2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frodehansen2/subscriptions","organizations_url":"https://api.github.com/users/frodehansen2/orgs","repos_url":"https://api.github.com/users/frodehansen2/repos","events_url":"https://api.github.com/users/frodehansen2/events{/privacy}","received_events_url":"https://api.github.com/users/frodehansen2/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-08T10:35:38Z","updated_at":"2018-08-08T10:43:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"68ce96765bc3719862478da286b1c711bcf017f2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/pulls/147/commits","review_comments_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/pulls/147/comments","review_comment_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/pulls/comments{/number}","comments_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/issues/147/comments","statuses_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/statuses/1991b29e1512a27c61b896d251233d62f3dc6ca6","head":{"label":"navikt:kalender","ref":"kalender","sha":"1991b29e1512a27c61b896d251233d62f3dc6ca6","user":{"login":"navikt","id":11848947,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExODQ4OTQ3","avatar_url":"https://avatars3.githubusercontent.com/u/11848947?v=4","gravatar_id":"","url":"https://api.github.com/users/navikt","html_url":"https://github.com/navikt","followers_url":"https://api.github.com/users/navikt/followers","following_url":"https://api.github.com/users/navikt/following{/other_user}","gists_url":"https://api.github.com/users/navikt/gists{/gist_id}","starred_url":"https://api.github.com/users/navikt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/navikt/subscriptions","organizations_url":"https://api.github.com/users/navikt/orgs","repos_url":"https://api.github.com/users/navikt/repos","events_url":"https://api.github.com/users/navikt/events{/privacy}","received_events_url":"https://api.github.com/users/navikt/received_events","type":"Organization","site_admin":false},"repo":{"id":130855671,"node_id":"MDEwOlJlcG9zaXRvcnkxMzA4NTU2NzE=","name":"foreldrepengesoknad","full_name":"navikt/foreldrepengesoknad","owner":{"login":"navikt","id":11848947,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExODQ4OTQ3","avatar_url":"https://avatars3.githubusercontent.com/u/11848947?v=4","gravatar_id":"","url":"https://api.github.com/users/navikt","html_url":"https://github.com/navikt","followers_url":"https://api.github.com/users/navikt/followers","following_url":"https://api.github.com/users/navikt/following{/other_user}","gists_url":"https://api.github.com/users/navikt/gists{/gist_id}","starred_url":"https://api.github.com/users/navikt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/navikt/subscriptions","organizations_url":"https://api.github.com/users/navikt/orgs","repos_url":"https://api.github.com/users/navikt/repos","events_url":"https://api.github.com/users/navikt/events{/privacy}","received_events_url":"https://api.github.com/users/navikt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/navikt/foreldrepengesoknad","description":"Selvbetjeningsløsning for søknad om foreldrepenger","fork":false,"url":"https://api.github.com/repos/navikt/foreldrepengesoknad","forks_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/forks","keys_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/keys{/key_id}","collaborators_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/teams","hooks_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/hooks","issue_events_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/issues/events{/number}","events_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/events","assignees_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/assignees{/user}","branches_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/branches{/branch}","tags_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/tags","blobs_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/git/refs{/sha}","trees_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/git/trees{/sha}","statuses_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/statuses/{sha}","languages_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/languages","stargazers_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/stargazers","contributors_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/contributors","subscribers_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/subscribers","subscription_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/subscription","commits_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/commits{/sha}","git_commits_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/git/commits{/sha}","comments_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/comments{/number}","issue_comment_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/issues/comments{/number}","contents_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/contents/{+path}","compare_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/compare/{base}...{head}","merges_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/merges","archive_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/downloads","issues_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/issues{/number}","pulls_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/pulls{/number}","milestones_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/milestones{/number}","notifications_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/labels{/name}","releases_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/releases{/id}","deployments_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/deployments","created_at":"2018-04-24T13:06:00Z","updated_at":"2018-08-08T09:12:44Z","pushed_at":"2018-08-08T10:35:39Z","git_url":"git://github.com/navikt/foreldrepengesoknad.git","ssh_url":"git@github.com:navikt/foreldrepengesoknad.git","clone_url":"https://github.com/navikt/foreldrepengesoknad.git","svn_url":"https://github.com/navikt/foreldrepengesoknad","homepage":null,"size":1954,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"base":{"label":"navikt:master","ref":"master","sha":"41cc0c3303dc1d1ec3907d08951aa69e2b03a5ed","user":{"login":"navikt","id":11848947,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExODQ4OTQ3","avatar_url":"https://avatars3.githubusercontent.com/u/11848947?v=4","gravatar_id":"","url":"https://api.github.com/users/navikt","html_url":"https://github.com/navikt","followers_url":"https://api.github.com/users/navikt/followers","following_url":"https://api.github.com/users/navikt/following{/other_user}","gists_url":"https://api.github.com/users/navikt/gists{/gist_id}","starred_url":"https://api.github.com/users/navikt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/navikt/subscriptions","organizations_url":"https://api.github.com/users/navikt/orgs","repos_url":"https://api.github.com/users/navikt/repos","events_url":"https://api.github.com/users/navikt/events{/privacy}","received_events_url":"https://api.github.com/users/navikt/received_events","type":"Organization","site_admin":false},"repo":{"id":130855671,"node_id":"MDEwOlJlcG9zaXRvcnkxMzA4NTU2NzE=","name":"foreldrepengesoknad","full_name":"navikt/foreldrepengesoknad","owner":{"login":"navikt","id":11848947,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExODQ4OTQ3","avatar_url":"https://avatars3.githubusercontent.com/u/11848947?v=4","gravatar_id":"","url":"https://api.github.com/users/navikt","html_url":"https://github.com/navikt","followers_url":"https://api.github.com/users/navikt/followers","following_url":"https://api.github.com/users/navikt/following{/other_user}","gists_url":"https://api.github.com/users/navikt/gists{/gist_id}","starred_url":"https://api.github.com/users/navikt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/navikt/subscriptions","organizations_url":"https://api.github.com/users/navikt/orgs","repos_url":"https://api.github.com/users/navikt/repos","events_url":"https://api.github.com/users/navikt/events{/privacy}","received_events_url":"https://api.github.com/users/navikt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/navikt/foreldrepengesoknad","description":"Selvbetjeningsløsning for søknad om foreldrepenger","fork":false,"url":"https://api.github.com/repos/navikt/foreldrepengesoknad","forks_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/forks","keys_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/keys{/key_id}","collaborators_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/teams","hooks_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/hooks","issue_events_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/issues/events{/number}","events_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/events","assignees_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/assignees{/user}","branches_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/branches{/branch}","tags_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/tags","blobs_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/git/refs{/sha}","trees_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/git/trees{/sha}","statuses_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/statuses/{sha}","languages_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/languages","stargazers_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/stargazers","contributors_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/contributors","subscribers_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/subscribers","subscription_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/subscription","commits_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/commits{/sha}","git_commits_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/git/commits{/sha}","comments_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/comments{/number}","issue_comment_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/issues/comments{/number}","contents_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/contents/{+path}","compare_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/compare/{base}...{head}","merges_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/merges","archive_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/downloads","issues_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/issues{/number}","pulls_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/pulls{/number}","milestones_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/milestones{/number}","notifications_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/labels{/name}","releases_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/releases{/id}","deployments_url":"https://api.github.com/repos/navikt/foreldrepengesoknad/deployments","created_at":"2018-04-24T13:06:00Z","updated_at":"2018-08-08T09:12:44Z","pushed_at":"2018-08-08T10:35:39Z","git_url":"git://github.com/navikt/foreldrepengesoknad.git","ssh_url":"git@github.com:navikt/foreldrepengesoknad.git","clone_url":"https://github.com/navikt/foreldrepengesoknad.git","svn_url":"https://github.com/navikt/foreldrepengesoknad","homepage":null,"size":1954,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/navikt/foreldrepengesoknad/pulls/147"},"html":{"href":"https://github.com/navikt/foreldrepengesoknad/pull/147"},"issue":{"href":"https://api.github.com/repos/navikt/foreldrepengesoknad/issues/147"},"comments":{"href":"https://api.github.com/repos/navikt/foreldrepengesoknad/issues/147/comments"},"review_comments":{"href":"https://api.github.com/repos/navikt/foreldrepengesoknad/pulls/147/comments"},"review_comment":{"href":"https://api.github.com/repos/navikt/foreldrepengesoknad/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/navikt/foreldrepengesoknad/pulls/147/commits"},"statuses":{"href":"https://api.github.com/repos/navikt/foreldrepengesoknad/statuses/1991b29e1512a27c61b896d251233d62f3dc6ca6"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"erlendev"}}