module FFaker::IdentificationPL
def pesel_checksum(date, serial_number)
def pesel_checksum(date, serial_number) pesel_digits = "#{date}#{serial_number}".split('').map(&:to_i) a, b, c, d, e, f, g, h, i, j = pesel_digits (a * 9 + b * 7 + c * 3 + d + e * 9 + f * 7 + g * 3 + h + i * 9 + j * 7) % 10 end