org-chef
org-chef copied to clipboard
Convert times to consistent formats
trafficstars
Currently org-chef just spews whatever into the time fields of recipe (prep-time, cook-time, ready-in). So it could end up being anything...
30m, 30mins, 30min, 30 mins, etc.
org-chef should have a consistent format for times.
I think the following format is reasonable:
[number of minutes][space]["min"]
Since,
- The unit
mincan be enforced as seconds are utterly irrelevant while cooking and if the recipe takes longer than 60min, we can still have the code convert it visually to, say,1h 30minor1.5h. - The space as separator makes it trivially easy to separate the number from the unit.
- The
minis the SI defined shorthand for a minute, asmis already taken for the meter, andminsimplies a plural, which is never used in SI units.
If we agree on this format, we can write a org-util to trim, expand and convert the typical variations of how times are written to this single format.