Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Cocoa
- for dc in [
- DateComponents(calendar: .current, year: 2018, month: 12, day: 25),
- DateComponents(calendar: .current, year: 2019, month: 1, day: 1)
- ]
- {
- print(
- Calendar.current.dateComponents(
- [.weekOfYear],
- from: Calendar.current.date(from: dc)!
- ).weekOfYear
- )
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement