Wolfram Language

Open live version

Find Your Age in Days

Find out how many days old you are, and how many days until your next birthday.


code

X
X

Make a website that shows days old and days until next birthday:

X
X
X

how it works

This example was live-coded at the Wolfram Research booth at SXSW, March 9, 2014.

How many days old are you?

In[1]:=
X
Out[1]=

How many days until your next birthday?

In[2]:=
X
Out[2]=

You can package those questions as functions. DaysOld is trivial:

In[3]:=
X

DaysToNextBirthday requires a little fancy footwork to construct the date of the next birthday:

In[4]:=
X

Make a web page using those functions. Use Style and Row to format the output nicely:

In[5]:=
X
Out[5]=

Click the URL in the previous output to visit the page.