title: Schedule local notification swift4
body: <p>I've made a local notification with swift4 every day every at 17.00. and I want the notification to not show up on holidays (Saturday, Sunday). How can I do that?</p>
  <p>Here is my code:</p>
  <pre><code>// schedule notification every day
          var dateComponents = DateComponents ()
          dateComponents.hour = 17
          dateComponents.minute = 00
          dateComponents.day = 7
          let trigger = UNCalendarNotificationTrigger (dateMatching: dateComponents, repeats: true)
          let request = UNNotificationRequest.init (identifier: &quot;Everyday&quot;, content: content, trigger: trigger)
  </code></pre>