Given that Christmas is:
- Month 12
- Day 25
Every year, determine today's date, and whether or not today is Christmas.
If it is Christmas, you must print
"It's Christmas". If it is not Christmas, you must somehow wait until Christmas and then print
From this Stack Overflow Question
import time while time.strftime("%b, %d", time.localtime()) != "Dec, 25": time.sleep(60) print "It's Christmas"
Python in 115 Characters
Here are the rules:
- Assume that the computer's clock is always right.
- Your code must be able to be started at any time.
- Your code must print
"It's Christmas"on Christmas.
- Looping is certainly not necessary, but once started your code should not stop until it has printed.
- Shortest code wins.