{"action":"created","issue":{"url":"https://api.github.com/repos/fullcalendar/fullcalendar/issues/338","repository_url":"https://api.github.com/repos/fullcalendar/fullcalendar","labels_url":"https://api.github.com/repos/fullcalendar/fullcalendar/issues/338/labels{/name}","comments_url":"https://api.github.com/repos/fullcalendar/fullcalendar/issues/338/comments","events_url":"https://api.github.com/repos/fullcalendar/fullcalendar/issues/338/events","html_url":"https://github.com/fullcalendar/fullcalendar/issues/338","id":101854427,"node_id":"MDU6SXNzdWUxMDE4NTQ0Mjc=","number":338,"title":"Long Events that Skip Weekends","user":{"login":"arshaw","id":56520,"node_id":"MDQ6VXNlcjU2NTIw","avatar_url":"https://avatars2.githubusercontent.com/u/56520?v=4","gravatar_id":"","url":"https://api.github.com/users/arshaw","html_url":"https://github.com/arshaw","followers_url":"https://api.github.com/users/arshaw/followers","following_url":"https://api.github.com/users/arshaw/following{/other_user}","gists_url":"https://api.github.com/users/arshaw/gists{/gist_id}","starred_url":"https://api.github.com/users/arshaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arshaw/subscriptions","organizations_url":"https://api.github.com/users/arshaw/orgs","repos_url":"https://api.github.com/users/arshaw/repos","events_url":"https://api.github.com/users/arshaw/events{/privacy}","received_events_url":"https://api.github.com/users/arshaw/received_events","type":"User","site_admin":false},"labels":[{"id":250039939,"node_id":"MDU6TGFiZWwyNTAwMzk5Mzk=","url":"https://api.github.com/repos/fullcalendar/fullcalendar/labels/Accepted","name":"Accepted","color":"CFE2F3","default":false},{"id":391263239,"node_id":"MDU6TGFiZWwzOTEyNjMyMzk=","url":"https://api.github.com/repos/fullcalendar/fullcalendar/labels/Event%20Model","name":"Event Model","color":"741B47","default":false},{"id":391255299,"node_id":"MDU6TGFiZWwzOTEyNTUyOTk=","url":"https://api.github.com/repos/fullcalendar/fullcalendar/labels/Event%20Rendering","name":"Event Rendering","color":"0B5394","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":24,"created_at":"2015-08-19T10:08:09Z","updated_at":"2018-10-17T15:45:34Z","closed_at":null,"author_association":"MEMBER","body":"Originally reported on Google Code with ID 67\n\n```\nI was looking for a way to render long events that span multiple weeks, but\nexclude weekends so I slapped this together. It may be a little to\nspecialized to my scenario and perhaps not particularly useful to others,\nbut I figured I'd share my code all the same. I've attached my\nfullcalendar.js, but here's just the code I added to the _renderEvents()\nfunction:\n\n    if (seg.event.weekends === false) {\n        if (seg.isStart && seg.start.getDay() == 0)\n            addDays(seg.start, 1, true);\n\n        if (seg.isStart && seg.start.getDay() == 6)\n            continue;\n\n        if (seg.isEnd && seg.end.getDay() == 1)\n            continue;\n    }\n    if (r2l) {\n        if (seg.event.weekends === false) {\n            left1 = seg.isEnd ?\n                                tr.find('td:eq(' + ((seg.end.getDay() + 5 - weekStart) % 7 * dis +\ndit) + ') div.day-content div').position().left :\n                                tr.find('td:eq(' + ((5 - weekStart) % 7 * dis + dit) + ')\ndiv.day-content div').position().left;\n            left2 = seg.isStart ?\n                                tr.find('td:eq(' + ((seg.start.getDay() - weekStart + 7) % 7 * dis\n+ dit) + ') div.day-content div') :\n                                tr.find('td:eq(' + ((1 - weekStart + 7) % 7 * dis + dit) + ')\ndiv.day-content div');\n        } else {\n            left1 = seg.isEnd ?\n                                tr.find('td:eq(' + ((seg.end.getDay() + 6 - weekStart) % 7 * dis +\ndit) + ') div.day-content div').position().left :\n                                tbody.position().left;\n            left2 = seg.isStart ?\n                                tr.find('td:eq(' + ((seg.start.getDay() - weekStart + 7) % 7 * dis\n+ dit) + ') div.day-content div') :\n                                tbody;\n        }\n        roundW = seg.isEnd;\n        roundE = seg.isStart;\n    } else {\n        if (seg.event.weekends === false) {\n            left1 = seg.isStart ?\n                                tr.find('td:eq(' + ((seg.start.getDay() - weekStart + 7) % 7) + ')\ndiv.day-content div').position().left :\n                                tr.find('td:eq(' + ((1 - weekStart + 7) % 7) + ') div.day-content\ndiv').position().left;\n            left2 = seg.isEnd ?\n                                tr.find('td:eq(' + ((seg.end.getDay() + 5 - weekStart) % 7) + ')\ndiv.day-content div') :\n                                tr.find('td:eq(' + ((seg.end.getDay() + 5 - weekStart) % 7) + ')\ndiv.day-content div');\n        } else {\n            left1 = seg.isStart ?\n                                tr.find('td:eq(' + ((seg.start.getDay() - weekStart + 7) % 7) + ')\ndiv.day-content div').position().left :\n                                tbody.position().left;\n            left2 = seg.isEnd ?\n                                tr.find('td:eq(' + ((seg.end.getDay() + 6 - weekStart) % 7) + ')\ndiv.day-content div') :\n                                tbody;\n        }\n        roundW = seg.isStart;\n        roundE = seg.isEnd;\n    }\n\nTo specify that an event should not span weekends simply add weekends:\nfalse to the event definition:\n\n    {\n        id: 1,\n        title: \"Long Event\",\n        start: new Date(2009, 7, 4, 14, 0),\n        end: new Date(2009, 7, 20, 11, 0),\n        weekends: false\n    }\n\n@adamrshaw: If I'm doing something sloppily in the code, I'd love to know\nit. I did the best I could with the information I had available.\n\nMy fullcalendar.js also appends an additional CSS class definition for\nweekend days. If you add this to fullcalendar.js:\n\n.full-calendar-month td.weekend\n{\n    background: #FFDFDF;\n}\n\nWeekends will be styled accordingly. This is may be a little redundant\nconsidering each day is also given a unique class, but oh well.\n\n\n```\n\nReported by `lakario` on 2009-07-29 00:04:09\n\n<hr>\n- _Attachment: [fullcalendar.js](https://storage.googleapis.com/google-code-attachments/fullcalendar/issue-67/comment-0/fullcalendar.js)_\n\nImported with **9** stars.\n"},"comment":{"url":"https://api.github.com/repos/fullcalendar/fullcalendar/issues/comments/430681789","html_url":"https://github.com/fullcalendar/fullcalendar/issues/338#issuecomment-430681789","issue_url":"https://api.github.com/repos/fullcalendar/fullcalendar/issues/338","id":430681789,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDY4MTc4OQ==","user":{"login":"jeremyweirich","id":14925069,"node_id":"MDQ6VXNlcjE0OTI1MDY5","avatar_url":"https://avatars1.githubusercontent.com/u/14925069?v=4","gravatar_id":"","url":"https://api.github.com/users/jeremyweirich","html_url":"https://github.com/jeremyweirich","followers_url":"https://api.github.com/users/jeremyweirich/followers","following_url":"https://api.github.com/users/jeremyweirich/following{/other_user}","gists_url":"https://api.github.com/users/jeremyweirich/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremyweirich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremyweirich/subscriptions","organizations_url":"https://api.github.com/users/jeremyweirich/orgs","repos_url":"https://api.github.com/users/jeremyweirich/repos","events_url":"https://api.github.com/users/jeremyweirich/events{/privacy}","received_events_url":"https://api.github.com/users/jeremyweirich/received_events","type":"User","site_admin":false},"created_at":"2018-10-17T15:45:34Z","updated_at":"2018-10-17T15:45:34Z","author_association":"NONE","body":"Bumping to check if there is intent to add this feature - it would really be quite helpful."}}
{"actor":{"display_login":"jeremyweirich"}}