Drop the meaning of case
I have found it error-prone, that I have to use uppercase for first code and lowercase for all others.
For example, when I have code like that:
jintervals(x, "{MM}:{ss}");
and I would like to also add hours, but I can't just add them like that:
jintervals(x, "{HH}:{MM}:{ss}");
I also have to change {MM} to lowercase:
jintervals(x, "{HH}:{mm}:{ss}");
Not very orthogonal - when changing one thing, I also have to change another.
Additionally I haven't found a use case for code like this:
jintervals(x, "{Hours} is the same as {Minutes}");
Actually currently this kind of use doesn't work correctly - at least with weeks.
When you really want something like this, then you can use:
jintervals(x, "{Hours}) + " is the same as " + jintervals(x, "{Minutes}");
Now that we parse the string before evaluating, the library can easily determine which is the highest unit by itself.
Plus, when we make all units lowercase, we solve the problem of which letter to assign to month unit when we decide to implement it, we can just differenciate them by case, like so:
- m - minutes
- M - Months