Template:Open hours: Difference between revisions

From MoHA Wiki
(Created page with "{{#subobject: |Slot type={{{Slot type|}}} |Schedule type={{{Schedule type|}}} |Print string days={{#switch: {{{Slot type|}}} |Single day={{{Single day|}}} |Range of days={{{Range day from|}}}–{{{Range day to|}}} |Exact date={{#time: l, m.d.y|{{{Exact date|}}}}} }} |Print string open hours={{#switch: {{{Schedule type|}}} |Day off=Day off |#default={{{Hour open from|}}}:{{{Minutes open from|}}}–{{{Hour open to|}}}:{{{Minutes open to|}}} }} |Print stri...")
 
No edit summary
Line 1: Line 1:
{{#subobject:
{{#vardefine: wdays|{{#switch: {{{Slot type|}}}
|Slot type={{{Slot type|}}}
|Schedule type={{{Schedule type|}}}
|Print string days={{#switch: {{{Slot type|}}}
   |Single day={{{Single day|}}}
   |Single day={{{Single day|}}}
   |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|}}}}}
}}
}}}}<!--
|Print string open hours={{#switch: {{{Schedule type|}}}
 
-->{{#vardefine: whours|{{#switch: {{{Schedule type|}}}
   |Day off=Day off
   |Day off=Day off
   |#default={{{Hour open from|}}}:{{{Minutes open from|}}}&ndash;{{{Hour open to|}}}:{{{Minutes open to|}}}
   |#default={{{Hour open from|}}}:{{{Minutes open from|}}}&ndash;{{#if:{{{Hour break from|}}}
}}
      |{{{Hour break from|}}}:{{{Minutes break from|}}}, {{{Hour break to|}}}:{{{Minutes break to|}}}&ndash;
|Print string break hours={{#switch: {{{Schedule type|}}}
      |{{{Hour open to|}}}:{{{Minutes open to|}}}
  |Day off=
    }}
  |#default={{{Hour break from|}}}:{{{Minutes break from|}}}&ndash;{{{Hour break to|}}}:{{{Minutes break to|}}}
}}}}<!--
}}
 
}}
-->{{#subobject:
|Slot type={{{Slot type|}}}
|Schedule type={{{Schedule type|}}}
|Print string days={{#var:wdays}}
|Print string hours={{#var:whours}}
}}<!--
 
--><div>
    <div>{{#var:wdays}}</div>
    <div>{{#var:whours}}</div>
  </div>

Revision as of 16:10, May 18, 2024