Template:GrowthTime
Description
This template is used to insert an ingredient icon inline with a growth time for crops and fruits.
This template allows the time to be rendered in a friendly, human-readable way, but maintains the value so that it can be sorted in tables. It also standardizes the formatting of displaying time across the wiki, which makes it easier to maintain.
The template does not currently properly handle use cases where growthTime is greater than 1440 minutes (1 day), as there are no in-game items that exceed this growth time.
Usage
In its most basic form, this template can be used by entering the following onto a relevant page:
{{growthTime|<<number of minutes>>}}
There is also the optional parameter concise
that can be added:
{{growthTime|<<number of minutes>>|concise}}
concise is intended for use in cases where the information is used in a large, information-heavy table, whereas the default setting is appropriate for an infoBox template.
Examples
{{growthTime|20}}
results in...
20 min
{{growthTime|135|concise}}
results in...
2 h 15 m
Sortable Table Example:
Name | Grow Time | Grow Time in Preferred Biome |
---|---|---|
Crop 1 | 1 hour 30 min | 1 hour 21 min |
Crop 2 | 20 min | 18 m |
Crop 3 | 5 h 7 m | 4 hours 36 min |
Crop 4 | 1 hour | 54 min |
Crop 5 | 1 d 1 m | 21 hours 36 min |
Crop 6 | 48 hours 1 min | 43 hours 12 min |