Template:OWASP Points Calculator

Usage
 

Help
This template is used for the actual calculating OWASP Points. It requires 2 parameters:
 * activity = The activity identifier (the code here actually does the translation, see OWASP Points for human readable detail), if this is an invalid code, points default to 0.
 * year = The year that the points were earned

Formula
First, the function checks to see if the points are <= 2 years old, if this is true, the function returns 0. If the points are fresher than 2 years it uses the activity code to do a look-up of the full point value of the activity. If the difference between the current year and the year the points were earned is 0 or 1 (earned same year or earned last year), the full point value is passed. If the points were earned 2 years ago, half the point value is passed.