final DateTime now = DateTime.now(); DateTime dateTime = DateTime(year, month, day); if (!dateTime.isBefore(DateTime(now.year, now.month, now.day))) { // 오늘 } else if (!dateTime.isBefore(DateTime(now.year, now.month, now.day - 1))) { // 어제 }