All Projects → heavybeard → Codice Fiscale

heavybeard / Codice Fiscale

Licence: mit
Javascript object for managing the italian tax code

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Codice Fiscale

Soulvercore
A powerful Swift framework for evaluating mathematical expressions
Stars: ✭ 245 (+2622.22%)
Mutual labels:  calculations
PrayerTimes-Swift
Islamic Prayer (salah) Time calculation written in swift.
Stars: ✭ 47 (+422.22%)
Mutual labels:  calculations
NinjaCalc
An embedded engineering calculator toolbox for doing calculations in a breeze.
Stars: ✭ 14 (+55.56%)
Mutual labels:  calculations
PyArmadillo
PyArmadillo: an alternative approach to linear algebra in Python
Stars: ✭ 58 (+544.44%)
Mutual labels:  calculations
pivottabler
Create Pivot Tables natively in R
Stars: ✭ 108 (+1100%)
Mutual labels:  calculations
texpr
Boolean evaluation and digital calculation expression engine for GO
Stars: ✭ 18 (+100%)
Mutual labels:  calculations
Js
turbo.js - perform massive parallel computations in your browser with GPGPU.
Stars: ✭ 2,591 (+28688.89%)
Mutual labels:  calculations
Css In Js Benchmarks
Stars: ✭ 360 (+3900%)
Mutual labels:  calculations
Pisces
Pisces is a time series database, desktop application, command line tool, and webapp. Pisces is designed to organize, graph, and analyze natural resource data that varies with time: gauge height, river flow, water temperature, etc.
Stars: ✭ 35 (+288.89%)
Mutual labels:  calculations
loan-payments-calculator
A small library for calculating loan payments using various configurations, works.
Stars: ✭ 13 (+44.44%)
Mutual labels:  calculations
MathExpressions.NET
➗ Library for parsing math expressions with rational numbers, finding their derivatives and compiling an optimal IL code
Stars: ✭ 63 (+600%)
Mutual labels:  calculations
earthcalc
This app calculates how much a distant object is obscured by the earth's curvature.
Stars: ✭ 74 (+722.22%)
Mutual labels:  calculations
ElectricPy
Electrical Engineering Python Module
Stars: ✭ 35 (+288.89%)
Mutual labels:  calculations
tfsaggregator
A server side plugin for Team Foundation Server (TFS) and Azure DevOps Server for performing various Work Item related calculations, create new Work Items and Links automatically.
Stars: ✭ 122 (+1255.56%)
Mutual labels:  calculations
KosherCocoa
My Objective-C port of KosherJava. KosherCocoa enables you to perform sunrise-based and sunset-based calculations for Jewish prayer and calendar.
Stars: ✭ 49 (+444.44%)
Mutual labels:  calculations
Rink Rs
Unit conversion tool and library written in rust
Stars: ✭ 242 (+2588.89%)
Mutual labels:  calculations
neat-form
Build form on Android using JSON schema; also includes view validation and skip logic.
Stars: ✭ 56 (+522.22%)
Mutual labels:  calculations
Yasumi
The easy PHP Library for calculating holidays
Stars: ✭ 788 (+8655.56%)
Mutual labels:  calculations
Ik
Minimal Inverse Kinematics library
Stars: ✭ 340 (+3677.78%)
Mutual labels:  calculations
calcuMLator
An intelligently dumb calculator that uses machine learning
Stars: ✭ 30 (+233.33%)
Mutual labels:  calculations

CodiceFiscale

Javascript object for managing the italian tax code.

bower install codice-fiscale --save

How To Use

Add the Object file

<script src="./CodiceFiscale.min.js" type="text/javascript"></script>

Use the function to calculate the tax code

var person = new CodiceFiscale({
    name: 'Mario',
    lastname: 'Rossi',
    day: '25',
    month: '04',
    year: '1945',
    isMale: true,
    communeName: 'Milano'
});

Use the public function for getting specific taxcode part

person.taxCode();       // RSSMRA45D25F205N
person.lastnameCode();  // RSS
person.nameCode();      //    MRA

person.dateCode();      //       45D25
person.yearCode();      //       45
person.monthCode();     //         D
person.dayCode();       //          25

person.communeCode();   //            F205

person.controlChar();   //                N

Known issues

Omocodia

This is an issue in italian system. In this case government offices change chars without a real algorithm because we don't know how many omocodias there're in this moment. Here there's a good explanation for calculating it.

It consists in replacing one or more of the seven numbers of the code, starting from the rightmost one, with the corresponding letters below:

0 = L | 1 = M | 2 = N | 3 = P | 4 = Q

5 = R | 6 = S | 7 = T | 8 = U | 9 = V

Calculation of control char

The control char calculation don't work properly, so the last tax code's char is not always right.

Versions

Version 1.1.2

  • Run npm audit fix for security

Version 1.1.1

  • Run npm audit fix for security

Version 1.1.0

  • Updated cadastral codes from Agenzia delle Entrate

Version 1.0.3

  • General fixes

Version 1.0.2

  • Added on bower packages
  • Fix bower.json file for publishing
  • Added beautified script on dist

Version 1.0.1

  • New functions for setting and getting properties
  • Functions now have correct scope
  • Properties refactoring

Version 1.0.0

  • Complete refactoring of the code
  • CodiceFiscale is an Object with a constructor
  • Create public function for specific taxcode part
  • Fixed control char calculation

Version 0.0.1

  • Initialize the code
  • CodiceFiscale is an Object without constructor
  • Used the original logic code

Credits

The code is freely taken from zingus.altervista.org. This is a refactoring code finally here, on Github.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].