0
私は今日ではなく過去のものである昨日の日付または日付を取得したいと思います。私はこのコードを使用しています -昨日の取得方法
Calendar calendarMessage = Calendar.getInstance();
Calendar calendarToday = Calendar.getInstance();
calendarMessage.setTime(date);
return calendarMessage.get(Calendar.YEAR) == calendarToday.get(Calendar.YEAR) &&
calendarMessage.get(Calendar.DAY_OF_YEAR) == calendarToday.get(Calendar.DAY_OF_YEAR);
あなたは私を助けてくれますか?
Googleがあなたの質問には約8.970答えを持っています。あなたはそれを試しましたか? – MrSmith42
インクリメンタルに-1を使用してください。http://stackoverflow.com/questions/8738369/how-to-add-days-into-the-date-in-android – Recomer