1
$\begingroup$

I am implementing Calendar View for my iOS application. I am using Date structure for calculating date. But, manually I am stuck with following things. I need formulae for calculation between days depends upon current date.

For Example:

Need to find following categorise depends upon the current date.

Where current date,

let date = 07

let month = 11

let weekDay = 03 (Tuesday)

let year = 2017

Find:

  1. Week day of this month where date is 01.
  2. Week day of last month end date and start date.
  3. Week day of current date on 2018.

Please give me the answer if you know at least one of 3 questions.

$\endgroup$
  • 2
    $\begingroup$ Have you looked at the older questions listed under "Related"? Some of them look very relevant. $\endgroup$ – Gerry Myerson Nov 7 '17 at 11:50
  • $\begingroup$ @GerryMyerson , Yes bro... tried 3 hours, but stuck with these 3 parts. $\endgroup$ – Rajamohan S Nov 7 '17 at 11:54
  • $\begingroup$ Really? and you can't figure out what day of the week the 1st is, from knowing the 7th is a Tuesday? $\endgroup$ – Gerry Myerson Nov 7 '17 at 11:57
  • $\begingroup$ @GerryMyerson, lol.. figured out just now bro... Thanks for this above comment.... may I need to delete this question? or Will I answer later? $\endgroup$ – Rajamohan S Nov 7 '17 at 12:01
  • 1
    $\begingroup$ If you don't think it's answered at one of those related questions, you can post an answer. $\endgroup$ – Gerry Myerson Nov 7 '17 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.