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

From blackwiki
Jump to navigation Jump to search
imported>Primefac
m (Protected "Template:Certification Table Entry/Sales/DanishPeriodHelper2": semi-protecting highly-visible templates in response to recent template-space vandalism ([Edit=Require autoconfirmed or confirmed access] (indefinite) [Move=Requi...)
imported>Muhandes
(correcting Denmark certification levels (see Template talk:Certification Table Entry))
 
Line 1: Line 1:
 
<includeonly>{{#if:{{{year|}}}
 
<includeonly>{{#if:{{{year|}}}
   |{{#ifexpr: {{{year}}} < 2003
+
   |{{#ifexpr: {{{year}}} < 1994
 
     |1
 
     |1
     |{{#ifexpr: {{{year}}} < 2004
+
     |{{#ifexpr: {{{year}}} < 2003 <!-- year is 1994-2002-->
       |{{#if:{{{month|}}}
+
       |2
        |{{#ifexpr: {{{month}}} < 4 |1|2}}
+
       |{{#ifexpr: {{{year}}} < 2004 <!-- year is 2003-->
        |0}}
+
         |{{#if:{{{month|}}}
       |{{#ifexpr: {{{year}}} < 2007
+
          |{{#ifexpr: {{{month}}} < 4 |2|3}}
        |2
+
          |0}}
         |{{#ifexpr: {{{year}}} < 2008
+
        |{{#ifexpr: {{{year}}} < 2007 <!-- year is 2004-2006-->
          |{{#if:{{{month|}}}
+
          |3
            |{{#ifexpr: {{{month}}} < 2 |2|3}}
+
          |{{#ifexpr: {{{year}}} < 2008 <!-- year is 2007-->
            |0}}
+
            |{{#if:{{{month|}}}
          |{{#ifexpr: {{{year}}} < 2010
+
              |{{#ifexpr: {{{month}}} < 2 |3|4}}
            |3
+
              |0}}
            |{{#ifexpr: {{{year}}} < 2011 <!-- year is 2010-->
+
            |{{#ifexpr: {{{year}}} < 2009 <!-- year is 2008-->
              |{{#if:{{{month|}}}
+
              |4
                |{{#ifexpr: {{{month}}} < 9 |3|4}}
+
               |{{#ifexpr: {{{year}}} < 2010 <!-- year is 2009-->
                |0}}
 
               |{{#ifexpr: {{{year}}} < 2012 <!-- year is 2011-->
 
 
                 |{{#if:{{{month|}}}
 
                 |{{#if:{{{month|}}}
                   |{{#ifexpr: {{{month}}} > 1
+
                   |{{#ifexpr: {{{month}}} < 4 |4|5}}
                    |5
 
                    |{{#if:{{{day|}}}
 
                      |{{#ifexpr: {{{day}}} < 7 |4|5}}
 
                      |0}}}}
 
 
                   |0}}
 
                   |0}}
                 |{{#ifexpr: {{{year}}} < 2014 <!-- year is 2012-2013-->
+
                 |{{#ifexpr: {{{year}}} < 2011 <!-- year is 2010-->
 
                   |5
 
                   |5
                   |{{#ifexpr: {{{year}}} < 2015 <!-- year is 2014-->
+
                   |{{#ifexpr: {{{year}}} < 2012 <!-- year is 2011-->
 
                     |{{#if:{{{month|}}}
 
                     |{{#if:{{{month|}}}
                       |{{#ifexpr: {{{month}}} < 11
+
                       |{{#ifexpr: {{{month}}} > 1
                         |5
+
                        |6
                         |{{#ifexpr: {{{month}}} < 12  
+
                         |{{#if:{{{day|}}}
                          |{{#if:{{{day|}}}
+
                          |{{#ifexpr: {{{day}}} < 7 |5|6}}
                            |{{#ifexpr: {{{day}}} <17 |5|6}}
+
                          |0}}}}
                            |0}}
+
                      |0}}
                          |6}}
+
                    |{{#ifexpr: {{{year}}} < 2014 <!-- year is 2012-2013-->
                      }}
+
                      |6
                      |0
+
                      |{{#ifexpr: {{{year}}} < 2015 <!-- year is 2014-->
                    }}                 
+
                         |{{#if:{{{month|}}}
                    |{{#ifexpr: {{{year}}} < 2016 <!-- year is 2015-->
+
                          |{{#ifexpr: {{{month}}} < 11
                      |6
+
                            |6
                      |{{#ifexpr: {{{year}}} < 2017 <!-- year is 2016-->
+
                            |{{#ifexpr: {{{month}}} < 12  
                        |{{#if:{{{month|}}}
+
                              |{{#if:{{{day|}}}
                          |{{#ifexpr: {{{month}}} < 4 |6|7}}
+
                                |{{#ifexpr: {{{day}}} <17 |6|7}}
                          |0}}
+
                                |0}}
                        |7
+
                              |7}}}}
                      }}
+
                          |0}}                 
                    }}
+
                        |{{#ifexpr: {{{year}}} < 2016 <!-- year is 2015-->
                  }}
+
                          |7
                }}
+
                          |{{#ifexpr: {{{year}}} < 2017 <!-- year is 2016-->
              }}
+
                            |{{#if:{{{month|}}}
            }}
+
                              |{{#ifexpr: {{{month}}} < 4 |7|8}}
          }}
+
                              |0}}
        }}
+
                            |8 <!-- year is 2017 and onward -->
      }}
+
                            }}
    }}
+
                          }}
  }}
+
                        }}
   |0
+
                      }}
}}
+
                    }}
 +
                  }}
 +
                }}
 +
              }}
 +
            }}
 +
          }}
 +
        }}
 +
      }}
 +
    }}
 +
   |0}}
 
</includeonly><noinclude>
 
</includeonly><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 00:35, 2 December 2018

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

This is a helper template for {{Certification Table Entry/Sales/DanishPeriod}}, see its documentation.

Variables

  • year – year of certification/release
  • month – month of certification/release
  • day – month of certification/release

Return values

Based on these 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.