Template:Open hours: Difference between revisions
From MoHA Wiki
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
}}}}<!-- | }}}}<!-- | ||
-->{{#vardefine: | -->{{#vardefine: checkW0|{{#ifeq:{{#time:a|{{{Hour open from|}}}:{{{Minutes open from|}}}:00}}|{{#time:a|{{{Hour open to|}}}:{{{Minutes open to|}}}:00}}||a}}}}<!-- | ||
-->{{#vardefine: checkW1|{{#ifeq:{{#time:a|{{{Hour open from|}}}:{{{Minutes open from|}}}:00}} | -->{{#vardefine: checkW1|{{#ifeq:{{#time:a|{{{Hour open from|}}}:{{{Minutes open from|}}}:00}}|{{#time:a|{{{Hour break from|}}}:{{{Minutes break from|}}}:00}}||a}}}}<!-- | ||
-->{{#vardefine: checkW2|{{#ifeq:{{#time:a|{{{Hour open to|}}}:{{{Minutes open to|}}}:00}} | -->{{#vardefine: checkW2|{{#ifeq:{{#time:a|{{{Hour open to|}}}:{{{Minutes open to|}}}:00}}|{{#time:a|{{{Hour break to|}}}:{{{Minutes break to|}}}:00}}||a}}}}<!-- | ||
-->{{#vardefine: whours|{{#switch: {{{Schedule type|}}} | -->{{#vardefine: whours|{{#switch: {{{Schedule type|}}} | ||
|Without a break={{#time:g{{#if:{{{Minutes open from|}}}|{{#ifeq:{{{Minutes open from|}}}|00||:i}}}}{{#var: | |Without a break={{#time:g{{#if:{{{Minutes open from|}}}|{{#ifeq:{{{Minutes open from|}}}|00||:i}}}}{{#var:checkW0}}|{{{Hour open from|}}}:{{{Minutes open from|}}}:00}}–<!-- | ||
-->{{#time:g{{#if:{{{Minutes open to |}}}|{{#ifeq:{{{Minutes open to |}}}|00||:i}}}}a|{{{Hour open to |}}}:{{{Minutes open to |}}}:00}} | -->{{#time:g{{#if:{{{Minutes open to |}}}|{{#ifeq:{{{Minutes open to |}}}|00||:i}}}}a|{{{Hour open to |}}}:{{{Minutes open to |}}}:00}} | ||
|With a break={{#time:g{{#if:{{{Minutes open from |}}}|{{#ifeq:{{{Minutes open from |}}}|00||:i}}}}{{#var:checkW1}}|{{{Hour open from |}}}:{{{Minutes open from |}}}:00}}–<!-- | |With a break={{#time:g{{#if:{{{Minutes open from |}}}|{{#ifeq:{{{Minutes open from |}}}|00||:i}}}}{{#var:checkW1}}|{{{Hour open from |}}}:{{{Minutes open from |}}}:00}}–<!-- | ||
Line 42: | Line 30: | ||
--><li>{{#switch:{{{Record type|}}} | --><li>{{#switch:{{{Record type|}}} | ||
|Opening | |Opening | ||
|Closing=<div>{{{Record type|}}}</div> | |Closing=<div>'''{{{Record type|}}}'''</div> | ||
|Working day=Open hours | |Working day=<div>'''Open hours'''</div> | ||
|#default= | |#default= | ||
}} | }} | ||
<div>{{#var:wdays}}</div> | <div>{{#var:wdays}}</div> | ||
<div>{{#ifeq: {{{Record type|}}}|Day off|Day off|{{#var:whours}}}}</div> | <div>{{#ifeq: {{{Record type|}}}|Day off|'''Day off'''|{{#var:whours}}}}</div> | ||
</li></includeonly> | </li></includeonly> |