The Fiscal Code | learn JavaScript expert level
- Each person in Italy has a unique identifying ID code issued by the national tax office after the birth registration: the Fiscal Code.
Given an object containing the personal data of a person (name, surname, gender and date of birth) return the 11 code characters as a string following these steps:
Generate 3 capital letters from the surname, if it has:
- At least 3 consonants then the first three consonants are used. (Newman ➞ NWM).
- Less than 3 consonants then vowels will replace missing characters in the same order they appear (Fox ➞ FXO | Hope ➞ HPO).
- Less than three letters then "X" will take the third slot after the consonant and the vowel (Yu ➞ YUX).
Generate 3 capital letters from the name, if it has:
- Exactly 3 consonants then consonants are used in the order they appear (Matt ➞ MTT).
- More than 3 consonants then first, third and fourth consonant are used (Samantha ➞ SNT | Thomas ➞ TMS).
- Less than 3 consonants then vowels will replace missing characters in the same order they appear (Bob ➞ BBO | Paula ➞ PLA).
- Less than three letters then "X" will take the the third slot after the consonant and the vowel (Al ➞ LAX).
Generate 2 numbers, 1 letter and 2 numbers from date of birth and gender:
- Take the last two digits of the year of birth (1985 ➞ 85).
- Generate a letter corresponding to the month of birth (January ➞ A | December ➞ T) using the table for conversion included in the code.
- For males take the day of birth adding one zero at the start if is less than 10 (any 9th day ➞ 09 | any 20th day ➞ 20).
- For females take the day of birth and sum 40 to it (any 9th day ➞ 49 | any 20th day ➞ 60).
Notes:
- Code letters must be uppercase.
- Date of birth is given in D/M/YYYY format.
- The conversion table for months is already in the starting code.
- Y is not a vowel.
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «The Fiscal Code | learn JavaScript expert level», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.