날짜 (2) 썸네일형 리스트형 [Android]해당 날짜가 월의 몇 주차인지 구하는 방법 fun main() { val now = DateTime.now() val firstDayOfMonth = DateTime(now.year, now.month, 1) val firstMonday = if (firstDayOfMonth.weekday.value [Android]현재 날짜(년-월-일-시-분-초) 구하기(SimpleDateFormat) // 현재 날짜(년/월/일 시/분/초) public String doYearMonthDay() { SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd-HH-mm-ss-SSS", Locale.KOREA); Date date = new Date(); String currentDate = formatter.format(date); return currentDate; } 원하시는 날짜 형식으로 입력하여 사용하시면 됩니다. 이전 1 다음