Difference between revisions of "Template:Certification Table Entry/Sales/HungarianPeriod"

From blackwiki
Jump to navigation Jump to search
imported>Muhandes
m (c)
 
imported>Muhandes
(add 2012 threshold level)
Line 2: Line 2:
 
   |{{#ifexpr: {{{year}}} < 1992
 
   |{{#ifexpr: {{{year}}} < 1992
 
     |1
 
     |1
     |{{#ifexpr: {{{year}}} > 2009
+
     |{{#ifexpr: {{{year}}} > 2012
       |7
+
       |8
 
       |{{#switch: {{{year}}}
 
       |{{#switch: {{{year}}}
|1992={{#if:{{{month|}}}
+
        |1992={{#if:{{{month|}}}
        |{{#ifexpr: {{{month}}} < 6
+
          |{{#ifexpr: {{{month}}} < 6
           |1
+
            |1
           |{{#ifexpr: {{{month}}} < 7
+
            |{{#ifexpr: {{{month}}} < 7
 +
              |{{#if:{{{day|}}}
 +
                |{{#ifexpr: {{{day}}} < 12|1|2}}
 +
                |0}}
 +
              |2}}}}
 +
           |0}}
 +
        |1993|1994|1995|1996=2
 +
        |1997={{#if:{{{month|}}}
 +
           |{{#ifexpr: {{{month}}} < 12
 +
            |2
 
             |{{#if:{{{day|}}}
 
             |{{#if:{{{day|}}}
               |{{#ifexpr: {{{day}}} < 12|1|2}}
+
               |{{#ifexpr: {{{day}}} < 3|2|3}}
               |0}}
+
               |0}}}}
            |2}}}}
+
          |0}}
        |0}}
+
        |1998|1999|2000|2001=3
|1993|1994|1995|1996=2
+
        |2002={{#if:{{{month|}}}
|1997={{#if:{{{month|}}}
+
          |{{#ifexpr: {{{month}}} < 4
        |{{#ifexpr: {{{month}}} < 12
+
            |3
          |2
+
            |{{#ifexpr: {{{month}}} < 5
          |{{#if:{{{day|}}}
+
              |{{#if:{{{day|}}}
            |{{#ifexpr: {{{day}}} < 23|2|3}}
+
                |{{#ifexpr: {{{day}}} < 23|3|4}}
            |0}}}}
+
                |0}}
        |0}}
+
              |4}}}}
|1998|1999|2000|2001=3
+
          |0}}
|2002={{#if:{{{month|}}}
+
        |2003|2004=4
        |{{#ifexpr: {{{month}}} < 4
+
        |2005={{#if:{{{month|}}}
          |3
+
          |{{#ifexpr: {{{month}}} < 2
          |{{#ifexpr: {{{month}}} < 5
+
            |4
            |{{#if:{{{day|}}}
+
            |{{#ifexpr: {{{month}}} < 3
              |{{#ifexpr: {{{day}}} < 23|3|4}}
+
              |{{#if:{{{day|}}}
              |0}}
+
                |{{#ifexpr: {{{day}}} < 23|4|5}}
            |4}}}}
+
                |0}}
        |0}}
+
              |5}}}}
|2003|2004=4
+
          |0}}
|2005={{#if:{{{month|}}}
+
        |2006={{#if:{{{month|}}}
        |{{#ifexpr: {{{month}}} < 2
+
          |{{#ifexpr: {{{month}}} < 9
          |4
+
            |5
          |{{#ifexpr: {{{month}}} < 3
+
            |{{#ifexpr: {{{month}}} < 10
            |{{#if:{{{day|}}}
+
              |{{#if:{{{day|}}}
              |{{#ifexpr: {{{day}}} < 23|4|5}}
+
                |{{#ifexpr: {{{day}}} < 13|5|6}}
              |0}}
+
                |0}}
            |5}}}}
+
              |6}}}}
        |0}}
+
          |0}}
|2006={{#if:{{{month|}}}
+
        |2007|2008=6
        |{{#ifexpr: {{{month}}} < 9
+
        |2009={{#if:{{{month|}}}
           |5
+
          |{{#ifexpr: {{{month}}} < 10|6|7}}
           |{{#ifexpr: {{{month}}} < 10
+
           |0}}
 +
        |2010|2011=7         
 +
        |2012={{#if:{{{month|}}}
 +
           |{{#ifexpr: {{{month}}} < 12
 +
            |7
 
             |{{#if:{{{day|}}}
 
             |{{#if:{{{day|}}}
               |{{#ifexpr: {{{day}}} < 13|5|6}}
+
               |{{#ifexpr: {{{day}}} < 14|7|8}}
 
               |0}}
 
               |0}}
             |6}}}}
+
             }}
        |0}}
+
          |0}}
|2007|2008=6
+
        }}
|2009={{#if:{{{month|}}}
+
      }}
        |{{#ifexpr: {{{month}}} < 10|6|7}}
+
    }}
        |0}}}}}}}}
 
 
   |0}}
 
   |0}}
 
</includeonly><noinclude>
 
</includeonly><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 09:37, 4 October 2019

50px Template documentation[view] [edit] [history] [purge]

This helper template calculates periods for Hungarian certifications, as stated in Mahasz#Certification levels

It returns:

Before 12 June 1992 Before 3 December 1997 Before 23 April 2002 Before 23 February 2005 Before 13 September 2006 Before 1 October 2009 Before 14 December 2012 Before 2018 Since 2018
1 2 3 4 5 6 7 8 9

Returns 0 if the data provided is not sufficient.