G
gimme_this_gimme_that
How do I get the date exactly 21 days from now?
Thanks.
Thanks.
How do I get the date exactly 21 days from now?
Thanks.
Tony Morris said:final long now = System.currentTimeMillis();
final long then = now + 1000 * 60 * 60 * 24 * 21;
Stefan said:If this time span contains a day that includes a change of
daylight saving time mode, that day might have more or less
than 24 hours. For certain values of »now« (around midnight)
the second »then« might be part of a day, whose date might not
be considered to be »21 days from now«.
Far more rare, a
similar effect could be triggered by leap seconds.
How do I get the date exactly 21 days from now?
Thanks.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.