Date arithmetic in TI Nspire

The TI Nspire CX (and also 83, 84, 89 series) provided a useful date function, dbd(), for finding the number of days between two input dates. However, after nothing turn up searching for function to perform days addition, a quick and dirty program is developed by taking advantage of this built-in function.

The program takes two parameters: a date and the number of day to add, and basically brute force a range of dates to check if the dbd() function returns a value equals that of the intended number of days to add. The program assumed the format DDMM.YY, while the built-in dbd() function accepts format in either DDMM.YY or MM.DDYY.

datecalc1

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s