User:Dantheox/flags.rb

From Wikipedia, the free encyclopedia

  1. For details on a flag, use
  2. Template:country data ABC

class Flags

 def Flags.flagicon(nation, year)
   if nation=="HOL"
     return "Flag of the Netherlands"
   elsif nation=="APA"
     return "Flag of Czechoslovakia"
   elsif nation=="AUT" && year <= 1918
     return"Flag of Austria"
   elsif nation=="BIH" && year <= 1998
     return"Flag of Bosnia and Herzegovina"
   elsif nation=="BUL" && year <= 1971
     return "Flag of Bulgaria"
   elsif nation=="BUL" && year <= 1990
     return "Flag of Bulgaria"
   elsif nation=="CAN" && year <= 1920
     return "Flag of Canada"
   elsif nation=="CAN" && year <= 1964
     return "Flag of Canada"
   elsif nation=="CHN" && year <= 1949
     return "Flag of the Republic of China"
   elsif nation=="EGY" && year < 1922
     return "Flag of Egypt"
   elsif nation=="EGY" && year <= 1952
     return "Flag of Egypt"
   elsif nation=="EGY" && year <= 1972
     return "Flag of Egypt"
   elsif nation=="ESP" && year < 1931
     return "Flag of Spain"
   elsif nation=="ESP" && year < 1939
     return "Flag of Spain"
   elsif nation=="ESP" && year < 1977
     return "Flag of Spain"
   elsif nation=="ESP" && year < 1981
     return "Flag of Spain"
   elsif nation=="GEO" && year <= 2004
     return "Flag of Georgia (country)"
   elsif nation=="GER" && year <= 1918
     return "Flag of Germany"
   elsif nation=="GER" && year <= 1934
     return "Flag of Germany"
   elsif nation=="GER" && year <= 1945
     return "Flag of Germany"
   elsif nation=="GRE" && year <= 1969
     return "Flag of Greece"
   elsif nation=="HKG" && year <= 1997
     return "Flag of Hong Kong"
   elsif nation=="HUN" && year < 1940
     return "Flag of Hungary"
   elsif nation=="HUN" && year <= 1945
     return "Flag of Hungary"
   elsif nation=="HUN" && year <= 1956
     return "Flag of Hungary"
   elsif nation=="IND" && year <= 1946
     return "Flag of India"
   elsif nation=="IRI" && year <= 1963
     return "Flag of Iran"
   elsif nation=="IRI" && year <= 1979
     return "Flag of Iran"
   elsif nation=="IRQ" && year < 1959
     return "Flag of Iraq"
   elsif nation=="IRQ" && year < 1963
     return "Flag of Iraq"
   elsif nation=="IRQ" && year < 1991
     return "Flag of Iraq"
   elsif nation=="IRQ" && year < 2003
     return "Flag of Iraq"
   elsif nation=="ITA" && year <= 1946
     return "Flag of Italy"
   elsif nation=="MAS" && year < 1948
     return "Flag of Malaysia"
   elsif nation=="MAS" && year <= 1963
     return "Flag of Malaysia"
   elsif nation=="MEX" && year <= 1933
     return "Flag of Mexico"
   elsif nation=="MEX" && year <= 1968
     return "Flag of Mexico"
   elsif nation=="RHO" && year <= 1967
     return"Flag of Rhodesia"
   elsif nation=="ROM" && year <= 1947
     return "Flag of Romania"
   elsif nation=="ROM" && year <= 1989
     return "Flag of Romania"
   elsif nation=="RSA" && year <= 1927
     return "Flag of South Africa"
   elsif nation=="RSA" && year <= 1994
     return "Flag of South Africa"
   elsif nation=="SRI" && year <= 1971
     return"Flag of Sri Lanka"
   elsif nation=="VIE" && year <= 1974
     return"Flag of South Vietnam"
   elsif nation=="YUG" && year <= 1941
     return"Flag of Yugoslavia"
   elsif nation=="YUG" && year <= 2002
     return"Flag of Yugoslavia"
   end
   return "Flag of ?}"
 end

end