swift3 - How to set the first date of current week to Wednesday in Swift? -


how set first date of week wednesday , show first , last date of week on yellow bar? because schedule update every wednesday.

app design screenshot

please check might :

var calendar = calendar.current calendar.firstweekday = 4  let startofweek = calendar.date(from: calendar.current.datecomponents([.yearforweekofyear, .weekofyear], from: date()))!     let endofweek = calendar.date(byadding: .day, value: 6, to: startofweek)!  print(startofweek) print(endofweek) 

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -