private fun getFirstWeek(year:Int, month:Int):Int{ var strMonth = "0" if(month < 10) strMonth += month else strMonth = month.toString() var strDate = year.toString() + strMonth +"01" val format = SimpleDateFormat("yyyyMMdd") val date = format.parse(strDate) val calendar = Calendar.getInstance() calendar.time = date return calendar.get(Calendar.DAY_OF_WEEK) }
private fun getWeekStr(week:Int):String{ when(week){ 1 -> return "日" 2 -> return "月" 3 -> return "火" 4 -> return "水" 5 -> return "木" 6 -> return "金" 7 -> return "土" } return ""}
댓글
댓글 쓰기