Week 8

Seasons of Love

Dates and words, from libraries the spec names. The work is the minutes between two dates.

You type

A date.

The tool
Two dates, then words A date Minutes until today Those minutes in words
What comes out

Those minutes, spoken as words.

The question, more slowly

The question is: a birth date comes in, and you print how many minutes have passed from that date until today, in words. The spec names the date library and the words library. Today means the day the program runs, so the number changes. That is expected.

The date has to be a real date in the shape the spec asks for. Subtracting two dates gives you days. Minutes are days times 24 times 60. The words library turns the integer into English.

People compute hours and forget the minutes, or they include the time of day when the spec is about dates. A date one day before today is 24 times 60 minutes, if you are on a normal day.

Before you code

Pick a date one day before today and compute the minutes by hand. There are 24 hours in a day and 60 minutes in an hour.