In Scala, how to get the day of the year