MOVED TO NEW OPEN SOURCE COLLECTION MONOREPO https://github.com/owsas/opensource
This module returns the generation of a person, given it's birth year
For example, if a person was born in 2000, it would say that he/she is from the Generation Z
npm i --save get-generation
- Traditionalist < 1946
- Older Boomer < 1955
- Younger Boomer < 1965
- Generation X (older) < 1971
- Generation X (younger) < 1981
- Generation Y < 1996
- Generation Z < 2011
- Generation Alpha (now) // 2018
import { getGenerationByAge, getGenerationByYear, getAllGenerationsInfo } from "get-generation";
getGenerationByYear(1954) // Older Boomer
getGenerationByYear(2011) // Generation Alpha
getGenerationByAge(20) // Generation Z (as of 2018)
getAllGenerationsInfo();
/* returns
[{
name: 'Traditionalist',
range: {
min: 0,
max: 1954,
},
}, {
name: 'Older Boomer',
....
}
]
*/
Juan Camilo Guarín Peñaranda Cali, Colombia
MIT.
- According to: Boston College
- And: [Carreer planner] (https://www.careerplanner.com/Career-Articles/Generations.cfm)