Template:Open hours: Difference between revisions

From MoHA Wiki
No edit summary
No edit summary
Line 3: Line 3:
   |Range of days={{{Range day from|}}}–{{{Range day to|}}}
   |Range of days={{{Range day from|}}}–{{{Range day to|}}}
   |Exact date={{#time: l, m.d.y|{{{Exact date|}}}}}
   |Exact date={{#time: l, m.d.y|{{{Exact date|}}}}}
}}}}<!--  
}}}}<!--
 
-->{{#vardefine: checkWO|{{#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}}
      |{{#time:a|{{{Hour break from|}}}:{{{Minutes break from|}}}:00}}
      |
      |a
  }}}}<!--
 
-->{{#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|}}}
  |Day off=Day off
    |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;<!--
  |Working day={{#time:g{{#if:{{{Minutes open from|}}}|{{#ifeq:{{{Minutes open from|}}}|00||&#58;i}}}}a|{{{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;<!--
  |Working day with break={{#time:g{{#if:{{{Minutes open from |}}}|{{#ifeq:{{{Minutes open from |}}}|00||&#58;i}}}}a|{{{Hour open from |}}}:{{{Minutes open from |}}}:00}}&ndash;<!--
                -->{{#time:g{{#if:{{{Minutes break from|}}}|{{#ifeq:{{{Minutes break from|}}}|00||&#58;i}}}}a|{{{Hour break from|}}}:{{{Minutes break from|}}}:00}}, <!--
                      -->{{#time:g{{#if:{{{Minutes break from|}}}|{{#ifeq:{{{Minutes break from|}}}|00||&#58;i}}}}a|{{{Hour break from|}}}:{{{Minutes break from|}}}:00}}, <!--
                -->{{#time:g{{#if:{{{Minutes break to  |}}}|{{#ifeq:{{{Minutes break to  |}}}|00||&#58;i}}}}{{#var:checkW2}}|{{{Hour break to  |}}}:{{{Minutes break to  |}}}:00}}&ndash;<!--
                      -->{{#time:g{{#if:{{{Minutes break to  |}}}|{{#ifeq:{{{Minutes break to  |}}}|00||&#58;i}}}}a|{{{Hour break to  |}}}:{{{Minutes break to  |}}}: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}}
  }}}}<!--  
}}}}<!--  


-->{{#subobject:
-->{{#subobject:
|Slot type={{{Slot type|}}}
    |Slot type={{{Slot type|}}}
|Schedule type={{{Schedule type|}}}
    |Schedule type={{{Schedule type|}}}
|Print string days={{#var:wdays}}
    |Record type={{{Record type|}}}
|Print string hours={{#var:whours}}
    |Print string days={{#var:wdays}}
}}<!--  
    |Print string hours={{#var:whours}}
  }}<!--  


--><li>
--><li>
    <div>{{{Record type|}}}</div>
     <div>{{#var:wdays}}</div>
     <div>{{#var:wdays}}</div>
     <div>{{#var:whours}}</div>
     <div>{{#var:whours}}</div>
   </li></includeonly>
   </li></includeonly>

Revision as of 19:24, May 18, 2024