Skip to main content
Adding language highlighting
Source Link
Sherlock9
  • 12.3k
  • 1
  • 30
  • 68

Python 3, 126 116 112 bytes

  

Edit: I'm keeping the other answer because it's cool, but this is shorter.

from time import*
"Monkey Rooster Dog Pig Rat Ox Tiger Rabbit Dragon Snake Goat".split()[localtime().tm_year%12]
from time import*
"Monkey Rooster Dog Pig Rat Ox Tiger Rabbit Dragon Snake Goat".split()[localtime().tm_year%12]

If trailing whitespace is ok, then it's 126 bytes. If not, it's 134 bytes after adding .strip() to the end of the code.

from datetime import*
"MRDPROTRDSHGoooiaxiarnoonoggt gbaaraks    ebgkstet    rioee ye     tn    r"[datetime.now().year%12::12]
from datetime import*
"MRDPROTRDSHGoooiaxiarnoonoggt gbaaraks    ebgkstet    rioee ye     tn    r"[datetime.now().year%12::12]

Python 3, 126 116 112 bytes

 

Edit: I'm keeping the other answer because it's cool, but this is shorter.

from time import*
"Monkey Rooster Dog Pig Rat Ox Tiger Rabbit Dragon Snake Goat".split()[localtime().tm_year%12]

If trailing whitespace is ok, then it's 126 bytes. If not, it's 134 bytes after adding .strip() to the end of the code.

from datetime import*
"MRDPROTRDSHGoooiaxiarnoonoggt gbaaraks    ebgkstet    rioee ye     tn    r"[datetime.now().year%12::12]

Python 3, 126 116 112 bytes

 

Edit: I'm keeping the other answer because it's cool, but this is shorter.

from time import*
"Monkey Rooster Dog Pig Rat Ox Tiger Rabbit Dragon Snake Goat".split()[localtime().tm_year%12]

If trailing whitespace is ok, then it's 126 bytes. If not, it's 134 bytes after adding .strip() to the end of the code.

from datetime import*
"MRDPROTRDSHGoooiaxiarnoonoggt gbaaraks    ebgkstet    rioee ye     tn    r"[datetime.now().year%12::12]
More golfing
Source Link
Sherlock9
  • 12.3k
  • 1
  • 30
  • 68

Python 3, 126 116116 112 bytes

Edit: I'm keeping the other answer because it's cool, but this is shorter.

from datetimetime import*
"Monkey Rooster Dog Pig Rat Ox Tiger Rabbit Dragon Snake Goat".split()[datetime.now[localtime().year%12]tm_year%12]

If trailing whitespace is ok, then it's 126 bytes. If not, it's 134 bytes after adding .strip() to the end of the code.

from datetime import*
"MRDPROTRDSHGoooiaxiarnoonoggt gbaaraks    ebgkstet    rioee ye     tn    r"[datetime.now().year%12::12]

Python 3, 126 116 bytes

Edit: I'm keeping the other answer because it's cool, but this is shorter.

from datetime import*
"Monkey Rooster Dog Pig Rat Ox Tiger Rabbit Dragon Snake Goat".split()[datetime.now().year%12]

If trailing whitespace is ok, then it's 126 bytes. If not, it's 134 bytes after adding .strip() to the end of the code.

from datetime import*
"MRDPROTRDSHGoooiaxiarnoonoggt gbaaraks    ebgkstet    rioee ye     tn    r"[datetime.now().year%12::12]

Python 3, 126 116 112 bytes

Edit: I'm keeping the other answer because it's cool, but this is shorter.

from time import*
"Monkey Rooster Dog Pig Rat Ox Tiger Rabbit Dragon Snake Goat".split()[localtime().tm_year%12]

If trailing whitespace is ok, then it's 126 bytes. If not, it's 134 bytes after adding .strip() to the end of the code.

from datetime import*
"MRDPROTRDSHGoooiaxiarnoonoggt gbaaraks    ebgkstet    rioee ye     tn    r"[datetime.now().year%12::12]
added 218 characters in body
Source Link
Sherlock9
  • 12.3k
  • 1
  • 30
  • 68

Python 3, 126126 116 bytes

Edit: I'm keeping the other answer because it's cool, but this is shorter.

from datetime import*
"Monkey Rooster Dog Pig Rat Ox Tiger Rabbit Dragon Snake Goat".split()[datetime.now().year%12]

If trailing whitespace is ok, then it's 126 bytes. If not, it's 134 bytes after adding .strip() to the end of the code.

from datetime import*
"MRDPROTRDSHGoooiaxiarnoonoggt gbaaraks    ebgkstet    rioee ye     tn    r"[datetime.now().year%12::12]

Python 3, 126 bytes

If trailing whitespace is ok, then it's 126 bytes. If not, it's 134 bytes after adding .strip() to the end of the code.

from datetime import*
"MRDPROTRDSHGoooiaxiarnoonoggt gbaaraks    ebgkstet    rioee ye     tn    r"[datetime.now().year%12::12]

Python 3, 126 116 bytes

Edit: I'm keeping the other answer because it's cool, but this is shorter.

from datetime import*
"Monkey Rooster Dog Pig Rat Ox Tiger Rabbit Dragon Snake Goat".split()[datetime.now().year%12]

If trailing whitespace is ok, then it's 126 bytes. If not, it's 134 bytes after adding .strip() to the end of the code.

from datetime import*
"MRDPROTRDSHGoooiaxiarnoonoggt gbaaraks    ebgkstet    rioee ye     tn    r"[datetime.now().year%12::12]
Source Link
Sherlock9
  • 12.3k
  • 1
  • 30
  • 68
Loading