Skip to content
This repository has been archived by the owner on Aug 6, 2019. It is now read-only.
/ get-generation Public archive

Gets the generation of a person, given his/her birth year

Notifications You must be signed in to change notification settings

owsas/get-generation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MOVED TO NEW OPEN SOURCE COLLECTION MONOREPO https://github.com/owsas/opensource

get-generation

Travis

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

Installation

npm i --save get-generation

Generations available

  • 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

Usage

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',
    ....
  }
]
*/

Creator

Juan Camilo Guarín Peñaranda Cali, Colombia

License

MIT.

Bibliography

About

Gets the generation of a person, given his/her birth year

Resources

Stars

Watchers

Forks

Packages

No packages published