# Challenge

Given that Christmas is:

• December
• 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 "It's Christmas".

# Example

import time
while time.strftime("%b, %d", time.localtime()) != "Dec, 25":
time.sleep(60)
print "It's Christmas"


Python in 115 Characters

# Rules

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.
• I thought the input is in Julian date before I read this post Dec 21, 2011 at 9:51

## Q (60)

 system"t 1000";.z.ts:{if[.z.d~2012.12.25;1"It’s Christmas"]}

• > If it is not Christmas, you must somehow wait until Christmas and then print "It's Christmas". Mar 7, 2012 at 13:55
• My apologies, corrected to check every second if it's Christmas...so this will print "It's Christmas" 86,400 times every 25th December. Obviously you can alter this by increasing the timer, which is in milliseconds. Mar 7, 2012 at 14:20

# PHP - 49 Characters

I got this quite short, so yeah.

<?while(date("dm")!="2512");echo"It's Christmas";


EDIT: Whoops, I printed something else than It's Christmas x3

## Rebol (53 chars)

wait difference 25-Dec-14 now
print "It's Christmas"


Of course the above will only wait till Xmas 2014 :)

Here's a version that will wait for next Xmas day:

next-xmas: does [
d: now
make date! reduce [25 12 either all [d/month = 12 d/day > 25][d/year + 1][d/year]]
]

wait difference next-xmas now
print "It's Christmas"


# Befunge-98 (36 chars)

Requires a Unicode-capable interpreter ('𐀀 is used for a literal 65536 and 'ఙ for 3097):

aa+y'𐀀%'ఙ-!#v_
s Christmas"<@,kd"It'


Explanation:

• Use y with an argument of 20 to get the date field (aa+y)
• Mask off the month & day portion by reducing mod-65536 ('𐀀%)
• Subtract 3097 (= month * 256 + day) ('ఙ-)
• If zero, print the string (abuses edge wrapping)
• Otherwise repeat
• Since default code-golf scoring is now in bytes, this should be at least 39 due to the multibyte characters. Jun 9, 2015 at 1:55

### J, 54

'It''s Christmas'[(-^:(3 :'-.12 25-:1 2{6!:0''''')^:_)1


# Groovy - 88

new Timer().schedule({print"It's Christmas"}as TimerTask,Date.parse("yyddMM","112512"))

• Is all that whitespace necessary?
– Joey
Dec 5, 2011 at 16:28
• @Joey no, it was for the sake of readability. Dec 5, 2011 at 16:32
• Does it work every year? Don't think so. Dec 8, 2011 at 22:43