0

Very simple question, but how can I know whether some date is Sunday or not?

I wanna get Bool from this. Are there some sources? Thanks!

Rob
  • 415,655
  • 72
  • 787
  • 1,044
Kyungyun Lee
  • 115
  • 9
  • 3
    Use [`Calendar`](https://developer.apple.com/documentation/foundation/calendar) methods, e.g., [`Calendar.current.component(.weekday, from: Date())`](https://developer.apple.com/documentation/foundation/calendar/2293299-component). See [`weekday`](https://developer.apple.com/documentation/foundation/nsdatecomponents/1410442-weekday). – Rob Apr 06 '22 at 16:01
  • Thank you very much Rob! I will try! I tested on Playground with Demo, and I think I can solve. Thanks for your one point lesson! – Kyungyun Lee Apr 06 '22 at 16:08

0 Answers0