Produce the number 2014 without any numbers in your source code
Python, 52 bytes
print sum(ord(c) for c in 'Happy new year to you!')
Updated for 2015 thanks to @Frg:
print sum(ord(c) for c in 'A Happy New Year to You!')
Mouse over to see 2016 version:
print sum(ord(c) for c in 'Happy New Year to you!!!')
Try it online!
Ruby, 15
p Time.new.year
Temporary ;)
Note that the section of the question
independently of any external variables such as the date or time or a random seed
was not edited in until long after I posted my answer...
Jan Dvorak offers a great alternative in the comments:
Happy = Time
Happy.new.year
But it's so unenthusiastic. I prefer:
Happy = Time
class Time; alias year! year; end
Happy.new.year!
Or even:
class Have; def self.a; A.new; end; end
class A; def happy; Time; end; end
class Time; alias year! year; end
Have.a.happy.new.year!
And here's correct English punctuation:
def noop x = nil; end
alias a noop
alias happy noop
alias new noop
alias year! noop
def Have x
p Time.new.year
end
Have a happy new year!
Okay okay, I couldn't help it:
def noop x = nil; end
eval %w[we wish you a merry christmas! christmas and a happy new].map{|x|"alias #{x} noop"}*"\n"
def year!; p Time.new.year; end
we wish you a merry christmas! we wish you a merry christmas!
we wish you a merry christmas and a happy new year!
Go, 2 bytes (UTF-16)
One unicode character (2 bytes in UTF-16, 3 bytes in UTF-8 format), output 2014 as part of an error
—
http://ideone.com/dRgKfk
can't load package: package :
prog.go:1:1: illegal character U+2014 '—'