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

From blackwiki
Jump to navigation Jump to search
imported>Muhandes
imported>Muhandes
(correct)
 
Line 1: Line 1:
 
<includeonly>{{#if:{{{year|}}}
 
<includeonly>{{#if:{{{year|}}}
   |{{#ifexpr: {{{year}}} < 2004 <!-- until 2003 -->
+
   |{{#ifexpr: {{{year}}} < 2005 <!-- until 2004 -->
 
     |1
 
     |1
     |{{#ifexpr: {{{year}}} < 2005 <!--  2004 -->
+
     |{{#ifexpr: {{{year}}} < 2006 <!-- 2005 -->
      |2
+
      |{{#if:{{{month|}}}
      |{{#ifexpr: {{{year}}} < 2006 <!-- 2005 -->
+
        |{{#ifexpr: {{{month}}} < 11 |1|2}}
        |{{#if:{{{month|}}}
+
        |0}}
          |{{#ifexpr: {{{month}}} < 11 |2|3}}
+
      |{{#ifexpr: {{{year}}} < 2007 <!-- 2006 -->
          |0}}
+
        |2
        |{{#ifexpr: {{{year}}} < 2007 <!-- 2006 -->
+
        |{{#ifexpr: {{{year}}} < 2008 <!-- 2007 -->
          |3
+
          |{{#if:{{{month|}}}
          |{{#ifexpr: {{{year}}} < 2008 <!-- 2007 -->
+
            |{{#ifexpr: {{{month}}} < 4 |2|3}}
            |{{#if:{{{month|}}}
+
            |0}}
              |{{#ifexpr: {{{month}}} < 4 |3|4}}
+
          |{{#ifexpr: {{{year}}} < 2009 <!-- 2008 -->
              |0}}
+
            |3
            |{{#ifexpr: {{{year}}} < 2009 <!-- 2008 -->
+
            |4 <!-- Since 2009 -->
              |5
 
              |6 <!-- Since 2009 -->
 
              }}
 
 
             }}
 
             }}
 
           }}
 
           }}
 
         }}
 
         }}
 
       }}
 
       }}
 +
    }}
 
     |0}}
 
     |0}}
 
</includeonly><noinclude>
 
</includeonly><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 13:56, 20 December 2018

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

This helper template calculates periods for Spanish singles certifications, as stated in Productores de Música de España#Certifications

It returns:

Before November 2005 Before April 2007 Before 2009 From 2009
1 2 3 4

Returns 0 if the data provided is not sufficient.