The last important property that we want functions to have is totality. This means that functions should handle every possible value of the type that they accept, which is actually trickier than it seems! For example, look at the xDaysAgo function again. What happens if x is negative? Or very large or small? Did we account for integer overflow? Especially when working with numbers, we need to understand their properties on the platform we're running on top of.
In our case, we're running on a JavaScript platform such as Node.js, so all numbers are internally represented as IEEE floats (that's how JavaScript works) and we can get pretty far before we need to worry about overflow. But consider the following trivial function:
let sendMoney ...