Open Ewg777 opened 6 years ago
Any solution on this?
@joakin8 try to add this to NSDate+Timepiece.swift:
static var systemWeekdayEuro: Bool?
var originalWeekday: Int {
return components.weekday!
}
var weekday: Int {
if Date.systemWeekdayEuro == nil {
let testDate = Date(timeIntervalSince1970: 0)
Date.systemWeekdayEuro = testDate.components.weekday == 4 // 1 янв 1970 был четверг
}
if Date.systemWeekdayEuro == true {
return originalWeekday
}
let weekdayNumber = components.weekday!
let result = (weekdayNumber - 1) % 7
if result == 0 {
return 7
}
return result
}
Thanks for your help Egw777, I created a fork from a swift 4 version of WWCalendarTimeSelector including your changes, also I added a open var called optionWeekDayStrings in order to be able to change the upper letters of the calendar. Feel free to try it.
It looks that's working well =)
Regads
No problem jokain8
@weilsonwonder is it possible?