How can I get a date 30 days later from today?

For example
How do I get the date 30 days after today’s date (year, month, day)?

How can I find the date 30 days before today?

How can I find out if two dates are the same or different?

How can I get the elapsed date between two dates?


Block of App Inventor.
I can easily get five days from today.


Block of App Inventor.
I can easily find out how many days have passed between some days.
How can I do this in thunkables?

I don’t really understand this post but it claims to have a solution to one of your questions:

1 Like


The figure is a block that you can find the interval between the current date and a specific date in the App Inventor. Is there such a block in thunkable? I looked up, but there was no. So is it impossible to compute this in thunkable?

I’m making an app for memorizing English words.
I have studied some words.
I want to see this word automatically again in 30 days.

To do that
I must first be able to calculate 30 days from today’s date.
I don’t know how.

And thirty days later, the thunkable compares to the date that the person is supposed to review today, and if yes, it shows the words we studied today.

To implement this, I want to know how to find the date after adding a specific day in today’s day. And I want to know how to compare dates. Find the distance between two dates.

I planned.
If you study a word today, you will have a plus 30 on today’s date.
Store this date plus 30 days in your local storage.
And every day when the app is opened, if a date like today’s date is in local storage, it reads the word that is the value recorded in the key.
I want to know the knowledge needed to implement this.

This might help… the website http://mathforum.org/library/drmath/view/66857.html suggests this method. I tried it with a couple dates and a calculator and it worked:

First of all, since February is an especially short month, it is
normally better to consider January and February the 13th and 14th
months of the previous year. So first, if the month is 1 or 2, then
you add 12 to the month and subtract 1 from the year. Then the day is

365 * year + year/4 - year/100 + year/400 + date + (153 * month+8)/5

where all of the divisions are rounded DOWN to the nearest integer.

Do this for both dates, and subtract.

1 Like

I would be grateful if you could show me what you said as a block of thunkable. I do not understand well.

What I don’t really understand is that thunkable is a successor to App Inventor. By the way, thunkable has removed nice and convenient features. Now this is also an App Inventor, which can be easily obtained.

There are math functions in Thunkable so it would require taking each of the expressions and converting them to blocks. So you would need to create blocks for 365*year and for year/4 and for each other expression above. Then use the math + and – blocks to combine everything.

If you need help, post a screenshot of what you’ve tried.

This work I will definitely implement.
But I have never used what you said and what you said in thunkable math, so I need to study quite a bit.

I’m going to put in a snapshot that I’m trying to implement, or understand it to some extent.

it really works.

1 Like

Is it thunkable?
How did you do it?

http://community.thunkable.com/uploads/thunkable1/original/3X/7/d/7d7a833582c5e2f5dbc5bb2d1c3d79269d47d502.png

This solution needs web api, naturally needs internet connection.

Write this link ( Number of days between January 1st, 2020 and January 18th, 2020 ) to your web browser.

There you will find a conclusion.

when you look at source codes you will see the conclusion (17 days) between “” …

resourse

I fetch source codes with “web api” and then I pick the necessary words with string blocks. thats it.

I don’t use this method because I want to create an app that works offline.