Quickly and easily calculate the duration between two dates using a variety of methods and easily generate a countdown in your app.

Overview

Extension Developer Luke Gackle
Clone Starter .aia LINK
Get the .aix Download
Click-to-Copy Link N/A
Donate to Developer
License N/A

Thunkable Community

If you have any questions about the Countdown extension then head on over to the Thunkable Community where you’ll find lots of amazing people who are happy to help you out.

Installation

If you need any help installing an extension then take a look at our “How to Install an Extension” guide.

Blocks

Procedures

GetCountdownFromInstants

Returns a list with the days, hours, minutes, and seconds between two dates. Arguments must be instants. This function ties in well if you have a Clock component in your project.

Returns YailList [days, hours, minutes, seconds]

GetCountdownFromStrings

Returns a list with the days, hours, minutes, and seconds between two dates. Arguments must be formatted correctly like MM/DD/YYYY hh:mm:ss, or MM/DD/YYYY or hh:mm.

GetDurationInYears

Returns the number of years between given start date and end date. Arguments must be formatted correctly like MM/DD/YYYY hh:mm:ss, or MM/DD/YYYY or hh:mm. Return value is processed through Math.floor to retrieve the nearest whole number to return.

Returns long (duration)

GetDurationInMonths

Returns the number of months between given start date and end date. Arguments must be formatted correctly like MM/DD/YYYY hh:mm:ss, or MM/DD/YYYY or hh:mm. Return value is processed through Math.floor to retrieve the nearest whole number to return.

Returns long (duration)

GetDurationInWeeks

Returns the number of weeks between given start date and end date. Arguments must be formatted correctly like MM/DD/YYYY hh:mm:ss, or MM/DD/YYYY or hh:mm.

Returns long (duration)

GetDurationInDays

Returns the number of days between given start date and end date. Arguments must be formatted correctly like MM/DD/YYYY hh:mm:ss, or MM/DD/YYYY or hh:mm

Returns long (duration)

GetDurationInHours

Returns the number of hours between given start date and end date. Arguments must be formatted correctly like MM/DD/YYYY hh:mm:ss, or MM/DD/YYYY or hh:mm.

Returns long (duration)

GetDurationInMinutes

Returns the number of minutes between given start date and end date. Arguments must be formatted correctly like MM/DD/YYYY hh:mm:ss, or MM/DD/YYYY or hh:mm.

Returns long (duration)

GetDurationInSeconds

Returns the number of seconds between given start date and end date. Arguments must be formatted correctly like MM/DD/YYYY hh:mm:ss, or MM/DD/YYYY or hh:mm.

Returns long (duration)

GetCurrentTimeAsString

Returns a String representing the current date and time in the format MM/DD/YYYY hh:mm:ss.

Returns String (Date/time)

Troubleshooting

Example App

This sample code creates an app the counts down to Google I/O 2020

Sample Code

The output of the above code will look like this:

Demo

Want to Help?

There are lots of great extensions being created and updateed everyday. Keeping this site up to date is a huge task. If you want to help out find out more in the Thunkable Community


Post written by: Luke