Deploy the “days old” calculation to make a website where you can enter a birthdate and find out how many days old you are:
CloudDeploy[FormFunction[{"birthdate" -> "Date"},
Round[Now - DateObject[#birthdate]] &,
"PNG"
], Permissions -> "Public"]
Click the link in the output to visit the site.
Format the output more nicely using Row:
CloudDeploy[FormFunction[{"birthdate" -> "Date"},
Row[{"You are ",
QuantityMagnitude[Round[Now - DateObject[#birthdate]]],
" days old."}] &,
"PNG"
], Permissions -> "Public"]
Make the text larger:
CloudDeploy[FormFunction[{"birthdate" -> "Date"},
Style[Row[{"You are ",
QuantityMagnitude[Round[Now - DateObject[#birthdate]]],
" days old."}], 48] &,
"PNG"
], Permissions -> "Public"]
Click the link in the output to visit the site.
Tell the world about your creation by sharing the link via email, tweet or other message.
CloudDeploy[FormFunction[{"birthdate" -> "Date"},
Style[Row[{"You are ",
QuantityMagnitude[Round[Now - DateObject[#birthdate]]],
" days old."}], 48] &,
"PNG"
], Permissions -> "Public"]