let calendar = Calendar(identifier: .gregorian)
return calendar.component(.weekday, from: date)
</pre>====日付計算====<pre>1> let d = Calendar.current.date(byAdding: .month, value:1, to: Date()) d: Foundation.Date? = 2022-07-03 15:37:30 UTC</pre>*NSDateに変換<pre>2> let d = Calendar.current.date(byAdding: .month, value:1, to: Date()) as! NSDate d: NSDate = 2022-07-03 15:38:43 UTC
</pre>