Template:Timefunc/doc
		
		
		
		
		
		Jump to navigation
		Jump to search
		
		
	
Template:Timefunc invokes function {{{func}}} in Module:Time using Lua.
Template:Timefunc invokes Module:Time using Lua.
Converts time values.
{{timefunc|func=function|input}}
Functions
- m_to_c
Converts a minute value into hh:mm:ss
| Code | Output | 
|---|---|
| {{timefunc|func=m_to_c|2}} | 00:02:00 | 
| {{timefunc|func=m_to_c|20}} | 00:20:00 | 
| {{timefunc|func=m_to_c|500}} | 08:20:00 | 
| {{timefunc|func=m_to_c|40/60}} | 00:00:40 | 
| {{timefunc|func=m_to_c|2.5}} | 00:02:30 | 
- w_to_c
Converts a single value and unit into hh:mm:ss
| Code | Output | 
|---|---|
| {{timefunc|func=w_to_c|20 minutes}} | 00:20:00 | 
| {{timefunc|func=w_to_c|30 seconds}} | 00:00:30 | 
| {{timefunc|func=w_to_c|5 hours}} | 05:00:00 | 
| {{timefunc|func=w_to_c|250 seconds}} | 00:04:10 | 
| {{timefunc|func=w_to_c|500 minutes}} | 08:20:00 | 
| {{timefunc|func=w_to_c|9001 seconds}} | 02:30:01 | 
- w_to_s
Converts a single value and unit into a number of seconds
| Code | Output | 
|---|---|
| {{timefunc|func=w_to_s|20 minutes}} | 1200 | 
| {{timefunc|func=w_to_s|30 seconds}} | 30 | 
| {{timefunc|func=w_to_s|5 hours}} | 18000 | 
| {{timefunc|func=w_to_s|500 minutes}} | 30000 | 
| {{timefunc|func=w_to_s|9001 seconds}} | 9001 | 
