Posts

Post not yet marked as solved
3 Replies
355 Views
I am trying to use initialize a Decimal type using its generic binary integer exactly initializer but it keeps crashing with a fatal error regardless of the value used: Code to reproduce the issue: let binaryInteger = -10 let decimal = Decimal(exactly: binaryInteger) // error: Execution was interrupted, reason: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0). Is it a known bug?
Posted
by leo dabus.
Last updated
.
Post marked as solved
2 Replies
999 Views
I am trying to get the weekdaySymbols from fixed calendar gregorian but it keeps returning the same result as shortWeekdaySymbols. The same applies for standaloneWeekdaySymbols. Calendar.current	// gregorian (current) let gregorian =  Calendar(identifier: .gregorian)   // gregorian (fixed) Calendar.current.weekdaySymbols  // ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] gregorian.weekdaySymbols	 // ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] Calendar.current.standaloneWeekdaySymbols   // ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] Calendar.current.shortWeekdaySymbols	 // ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] gregorian.standaloneWeekdaySymbols	 // ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] gregorian.shortWeekdaySymbols	 // ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
Posted
by leo dabus.
Last updated
.