scripts/itunes_genre_tag/amg.rb
# normalize to a list of integers only
normalize to a list of integers only
normalize to a list of integers only
def normalize_years(years)
            return years if years.nil? or years.empty?
            return years.map { |y|
                if y !~ /s$/ then 
                    next y
                elsif y == '00s' then 
                    next 2000
                elsif y =~ /(\d\d)s/ then 
                    next ($1.to_i + 1900)
                end
            }
        end
def normalize_years ( years ) return years if years . nil? or years . empty? return years . map { | y | if y !~ / s$ / then next y elsif y == '00s' then next 2000 elsif y =~ / ( \d \d )s / then next ( $1 . to_i + 1900 ) end } end
normalize to a list of integers only
normalize to a list of integers only
years
<not_specific>