title: Get all dates as list for given month and year in scala
body: <p>I tired to write function to get all dates as list for given month and year as follow</p>
  
  <pre><code>def allDaysForYear(year: String , month:String): List[(String, String, String)] = {
    val daysInYear = if(Year.of(year.toInt).isLeap) 366 else 365
    for {
      day &lt;- (1 to daysInYear).toList
      localDate = LocalDate.ofYearDay(year.toInt, day)
      month = localDate.getMonthValue
      dayOfMonth = localDate.getDayOfMonth
    } yield (year, month.toString, dayOfMonth.toString)
  }
  </code></pre>
  
  <p>What I expect is following list</p>
  
  <pre><code>List(2016-10-01,2016-10-02,.....ect)
  </code></pre>
  
  <p>Can any one help on this</p>