I looked through the Android API and looked for a way to calculate the number of days between the current date and the future date. I am new to android and I earned java in a few years. The easiest way to calculate this?
thank
The easiest way is to use Joda Time for this:
Date oldEventDate = ... Date newEventDate = ... Days days = Days.daysBetween(new DateTime(oldEventDate), new DateTime(newEventDate)); int numberOfDays = p.getDays();
Source: https://habr.com/ru/post/1796223/More articles:Days Between Java Dates (Homework) - javaFunction pointers against calling cout directly - c ++Algorithm Problem - algorithmSystem.DateTime and Sql datetime2 in Linq2Sql (using sqlmetal) - typesSend notifications only when activity is in the background - androidProve the correct unit test - unit-testingDjango South: How to use with multiple codebase installations and one central database? - pythonfinding the difference in days from two given dates - javaUsing SetParent to steal the main window of another process, but saving separate message loops - multithreadinghttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1796228/a-way-for-dynamically-allocated-objects-to-be-automatically-deleted-after-a-set-period-of-time&usg=ALkJrhhci7GRMdSoziVN7quOnDaPXWE8hAAll Articles