0

Why I can't use | Binary operator in calendar.components to separate the units? According to this article by NSHipster or this Github project by minorbug I should be allowed to do it.

Code:

calendar.components(NSCalendarUnit.Month | NSCalendarUnit.Day, fromDate: date)

Answers I find in Apple Community: But Xcode 7 don't allow me to use NSDateComponentsFormatter() for componentsUnits.

Concerns: This might be Xcode 7 cause someone says this is fine in Xcode 6, does anyone have a solution to this?

Brian Nezhad
  • 6,148
  • 9
  • 44
  • 69

0 Answers0