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

From blackwiki
Jump to navigation Jump to search
imported>Muhandes
(correct with new data)
imported>Muhandes
(Changes since 2011 implemented)
Line 14: Line 14:
 
           |{{#ifexpr: {{{year}}} < 2010
 
           |{{#ifexpr: {{{year}}} < 2010
 
             |3
 
             |3
             |{{#ifexpr: {{{year}}} < 2011
+
             |{{#ifexpr: {{{year}}} < 2011 <!-- year is 2010-->
 
               |{{#if:{{{month|}}}
 
               |{{#if:{{{month|}}}
 
                 |{{#ifexpr: {{{month}}} < 9 |3|4}}
 
                 |{{#ifexpr: {{{month}}} < 9 |3|4}}
 
                 |0}}
 
                 |0}}
               |{{#if:{{{month|}}}
+
               |{{#ifexpr: {{{year}}} < 2012 <!-- year is 2011-->
                |{{#ifexpr: {{{month}}} > 1
+
                |{{#if:{{{month|}}}
 +
                  |{{#ifexpr: {{{month}}} > 1
 +
                    |5
 +
                    |{{#if:{{{day|}}}
 +
                      |{{#ifexpr: {{{day}}} < 7 |4|5}}
 +
                      |0}}}}
 +
                  |0}}
 +
                |{{#ifexpr: {{{year}}} < 2014 <!-- year is 2012-2013-->
 
                   |5
 
                   |5
                   |{{#if:{{{day|}}}
+
                   |{{#ifexpr: {{{year}}} < 2015 <!-- year is 2014-->
                    |{{#ifexpr: {{{day}}} < 7 |4|5}}
+
                    |{{#if:{{{month|}}}
                    |0}}}}
+
                      |{{#ifexpr: {{{month}}} < 11
                 |0}}}}}}}}}}}}}}
+
                        |5
   |0}}
+
                        |{{#ifexpr: {{{month}}} < 12
 +
                          |{{#if:{{{day|}}}
 +
                            |{{#ifexpr: {{{day}}} <17 |5|6}}
 +
                            |0}}
 +
                          |6}}
 +
                      }}
 +
                      |0
 +
                    }}                  
 +
                    |{{#ifexpr: {{{year}}} < 2016 <!-- year is 2015-->
 +
                      |6
 +
                      |{{#ifexpr: {{{year}}} < 2017 <!-- year is 2016-->
 +
                        |{{#if:{{{month|}}}
 +
                          |{{#ifexpr: {{{month}}} < 4 |6|7}}
 +
                          |0}}
 +
                        |7
 +
                      }}
 +
                    }}
 +
                  }}
 +
                }}
 +
              }}
 +
            }}
 +
          }}
 +
        }}
 +
      }}
 +
    }}
 +
  }}
 +
   |0
 +
}}
 
</includeonly><noinclude>
 
</includeonly><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 10:37, 15 September 2017

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

This helper template calculates periods for Danish certifications, as stated in the following sources:

  • [1] - Album level changed in 1994
  • [2] - levels changed in April 2003
  • [3] - new levels for albums and singles in February 2007
  • [4] new levels for singles changed in April 2009
  • [5] - new albums levels change in 7 January 2011
  • [6] - new single levels from 17 November 2014
  • [7] - new single levels from 1 April 2016

It returns:

Before 1994 Before April 2003 Before February 2007 Before April 2009 Before 7 January 2011 Before 17 November 2014 Before 1 April 2016 From 1 April 2016
1 2 3 4 5 6 7 8

Returns 0 if the data provided is not sufficient.