Template:Open hours: Difference between revisions

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


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

Revision as of 19:44, May 18, 2024