Skip to main content
added 635 characters in body
Source Link

Groovy, 57 bytes

d=new Date().getYear()+1899;(d​..d-120).each{println it​}

Explanation coming in a few hours.Explanation

d=new Date().getYear()                               //returns how many years have passed since 1900
                      +1899;                         //adding 1900 will give us the current year, but we want the program to start one year before, so we do +1900-1=1899
                            (d..d-120)               //a range from the current year -1 to 120 years before that
                                      .each{print it}// for each element in the range, print it.

Output

2016
2015
2014
...
1898
1897
1896

Because of the 1899 trick, it starts with 2016 instead of 2017

Tested on the Groovy Web Console

Groovy, 57 bytes

d=new Date().getYear()+1899;(d​..d-120).each{println it​}

Explanation coming in a few hours.

Tested on the Groovy Web Console

Groovy, 57 bytes

d=new Date().getYear()+1899;(d​..d-120).each{println it​}

Explanation

d=new Date().getYear()                               //returns how many years have passed since 1900
                      +1899;                         //adding 1900 will give us the current year, but we want the program to start one year before, so we do +1900-1=1899
                            (d..d-120)               //a range from the current year -1 to 120 years before that
                                      .each{print it}// for each element in the range, print it.

Output

2016
2015
2014
...
1898
1897
1896

Because of the 1899 trick, it starts with 2016 instead of 2017

Tested on the Groovy Web Console

Source Link

Groovy, 57 bytes

d=new Date().getYear()+1899;(d​..d-120).each{println it​}

Explanation coming in a few hours.

Tested on the Groovy Web Console