Template:Open hours: Difference between revisions

From MoHA Wiki
No edit summary
No edit summary
Line 5: Line 5:
}}}}<!--
}}}}<!--


-->{{#vardefine: checkW0|{{#ifeq:{{#time:a|{{{Hour open from|}}}:{{{Minutes open from|00}}}:00}}|{{#time:a|{{{Hour open to|}}}:{{{Minutes open to|00}}}:00}}||a}}}}<!--
-->{{#vardefine: checkW0|{{#ifeq:{{#time:a|{{{Hour open from|00}}}:{{{Minutes open from|00}}}:00}}|{{#time:a|{{{Hour open to|00}}}:{{{Minutes open to|00}}}:00}}||a}}}}<!--


-->{{#vardefine: checkW1|{{#ifeq:{{#time:a|{{{Hour open from|}}}:{{{Minutes open from|00}}}:00}}|{{#time:a|{{{Hour break from|}}}:{{{Minutes break from|00}}}:00}}||a}}}}<!--
-->{{#vardefine: checkW1|{{#ifeq:{{#time:a|{{{Hour open from|00}}}:{{{Minutes open from|00}}}:00}}|{{#time:a|{{{Hour break from|00}}}:{{{Minutes break from|00}}}:00}}||a}}}}<!--


-->{{#vardefine: checkW2|{{#ifeq:{{#time:a|{{{Hour open to|}}}:{{{Minutes open to|00}}}:00}}|{{#time:a|{{{Hour break to|}}}:{{{Minutes break to|00}}}:00}}||a}}}}<!--  
-->{{#vardefine: checkW2|{{#ifeq:{{#time:a|{{{Hour open to|00}}}:{{{Minutes open to|00}}}:00}}|{{#time:a|{{{Hour break to|00}}}:{{{Minutes break to|00}}}: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}}}|00||&#58;i}}}}{{#var:checkW0}}|{{{Hour open from|}}}:{{{Minutes open from|00}}}:00}}&ndash;<!--
     |Without a break={{#time:g{{#if:{{{Minutes open from|00}}}|{{#ifeq:{{{Minutes open from|00}}}|00||&#58;i}}}}{{#var:checkW0}}|{{{Hour open from|00}}}:{{{Minutes open from|00}}}:00}}&ndash;<!--
                   -->{{#time:g{{#if:{{{Minutes open to |}}}|{{#ifeq:{{{Minutes open to |00}}}|00||&#58;i}}}}a|{{{Hour open to |}}}:{{{Minutes open to |00}}}:00}}
                   -->{{#time:g{{#if:{{{Minutes open to|00}}}|{{#ifeq:{{{Minutes open to|00}}}|00||&#58;i}}}}a|{{{Hour open to|00}}}:{{{Minutes open to|00}}}:00}}
     |With a break={{#time:g{{#if:{{{Minutes open from |}}}|{{#ifeq:{{{Minutes open from |00}}}|00||&#58;i}}}}{{#var:checkW1}}|{{{Hour open from |}}}:{{{Minutes open from |00}}}:00}}&ndash;<!--
     |With a break={{#time:g{{#if:{{{Minutes open from|00}}}|{{#ifeq:{{{Minutes open from|00}}}|00||&#58;i}}}}{{#var:checkW1}}|{{{Hour open from|00}}}:{{{Minutes open from|00}}}:00}}&ndash;<!--
                 -->{{#time:g{{#if:{{{Minutes break from|}}}|{{#ifeq:{{{Minutes break from|00}}}|00||&#58;i}}}}a|{{{Hour break from|}}}:{{{Minutes break from|00}}}:00}}, <!--
                 -->{{#time:g{{#if:{{{Minutes break from|00}}}|{{#ifeq:{{{Minutes break from|00}}}|00||&#58;i}}}}a|{{{Hour break from|00}}}:{{{Minutes break from|00}}}:00}}, <!--
                 -->{{#time:g{{#if:{{{Minutes break to |}}}|{{#ifeq:{{{Minutes break to |00}}}|00||&#58;i}}}}{{#var:checkW2}}|{{{Hour break to |}}}:{{{Minutes break to |00}}}:00}}&ndash;<!--
                 -->{{#time:g{{#if:{{{Minutes break to|00}}}|{{#ifeq:{{{Minutes break to|00}}}|00||&#58;i}}}}{{#var:checkW2}}|{{{Hour break to|00}}}:{{{Minutes break to|00}}}:00}}&ndash;<!--
                 -->{{#time:g{{#if:{{{Minutes open to   |}}}|{{#ifeq:{{{Minutes open to   |00}}}|00||&#58;i}}}}a|{{{Hour open to   |}}}:{{{Minutes open to   |00}}}:00}}
                 -->{{#time:g{{#if:{{{Minutes open to|00}}}|{{#ifeq:{{{Minutes open to|00}}}|00||&#58;i}}}}a|{{{Hour open to|00}}}:{{{Minutes open to|00}}}:00}}
   }}}}<!--  
   }}}}<!--  



Revision as of 19:51, May 18, 2024