Template:GrowthTime

From Dreamlight Valley Wiki
Jump to navigation Jump to search

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...

Menu Icon Ingredients.png 20 min


{{growthTime|135|concise}}

results in...

Menu Icon Ingredients.png 2 h 15 m


Sortable Table Example:

Name Grow Time Grow Time in Preferred Biome
Crop 1 Menu Icon Ingredients.png 1 hour 30 min Menu Icon Ingredients.png 1 hour 21 min
Crop 2 Menu Icon Ingredients.png 20 min Menu Icon Ingredients.png 18 m
Crop 3 Menu Icon Ingredients.png 5 h 7 m Menu Icon Ingredients.png 4 hours 36 min
Crop 4 Menu Icon Ingredients.png 1 hour Menu Icon Ingredients.png 54 min
Crop 5 Menu Icon Ingredients.png 1 d 1 m Menu Icon Ingredients.png 21 hours 36 min
Crop 6 Menu Icon Ingredients.png 48 hours 1 min Menu Icon Ingredients.png 43 hours 12 min