91
votes
Accepted
How much time is remaining?
Excel, 6 Bytes
=B1-A1
Assuming A is in cell A1 and B is in cell B1
82
votes
Sleep for 1000 years
C (gcc), 40 36 32 29 26 24 bytes
i;f(){--i&&f(sleep(7));}
Try it online!
-3 thanks to @gastropner.
-1 recursive approach thanks to @AZTECCO.
...
62
votes
Increment The Time
Microsoft Excel, 9 bytes
=A1+"0:1"
Input is in cell A1.
Tested on my Mac (Excel for Mac version 16.53) and online at ...
58
votes
Encode the date in Christmas Eve format
SmileBASIC, 73 71 67 bytes
?"Christmas";
@L?" Eve"*(D!=P);
P=D
DTREAD OUT,M,D
IF M/D-.48GOTO@L
The program prints "Christmas", then ...
55
votes
Output the Current Time
Minecraft 1.8.7, 7 + 8 = 15 blytes (bytes + blocks)
Only one command block involved:
xp 1 @p
Output goes to the client console like so:
As part of the normal output.
This is the system:
...
44
votes
Sort the months of the year
Jelly, 19 bytes
11ị“bMAanlseovc”iµÞ
This is a monadic link that takes a list as argument and sorts it. Try it online!
Background
Jelly uses modular, 1-based ...
42
votes
41
votes
Accepted
When is Thanksgiving?
TI-BASIC, 15 bytes * 0.75 = 11.25
Tested on my TI-84+ calculator
1129-dayOfWk(Ans+ᴇ4,9,1
Thankgiving is November 29, minus the day of the week of September 1st, ...
41
votes
41
votes
Sleep for 1000 years
Python 3 (Excluding CPython on Windows), 28 bytes
import time
time.sleep(3e10)
Try it online! (Remember to put something in your will so future generations can ...
40
votes
I'm too cold, turn up the temperature
Minecraft 1.9.0+, 204 162 bytes + 58 36 28 24 20 blocks = 262 240 232 186 182 blytes
This solution is golfed down, and it can't be seen whole in one, or even two screenshots. Uses two glitches and ...
40
votes
Setting the time
HTML on Google Chrome 67 in Chinese (Simplified), 39 bytes
<input type=time value=00:00 autofocus>
Chrome show different UI component in different ...
39
votes
I'm too cold, turn up the temperature
Bash + linux utilities, 19
seq 40 2 72|pv -qlL2
seq generates the numerical output. pv ...
37
votes
36
votes
How many days in a month?
JavaScript (ES6), 48 47 44 43 42 bytes
m=>31^'311'[parseInt(m[1]+m[2],34)*3%49%8]
Demo
...
31
votes
Advance Happy New Year, 2016!
Mathematica, 45 37 27 24 bytes
#+5[6,6,11][[#~Mod~4]]&
Improvements thanks to @MartinBüttner (10 bytes), and @ChipHurst (a further 3 bytes).
30
votes
Sleep for 1000 years
bash, 26 24 bytes
I think part of the challenge here is to not have a signed 32 bit overflow, so:
ping -i86400 -c365243 t.co
The idea here is to make 1000 years of ...
29
votes
28
votes
Accepted
Output each second
MacOS shell, 3
top
On the Mac, top's default refresh period is 1 sec.
Linux shell, 7
...
27
votes
Legen… wait for it…
JavaScript (ES6), 74 bytes
You may want to change your system clock before testing, congratulations if you landed here at 59 minutes past.
...
27
votes
We had a question once which only failed on Sundays
Bash + coreutils, 15 14 bytes
`date|grep Su`
Try it online!
27
votes
27
votes
Accepted
Days in indexed month
APL (Dyalog Unicode), 13 12 bytesSBCS
Anonymous tacit prefix function. 0-indexed. February is 29.
31-1∘=+2|7∘|
Try it online!
...
26
votes
Convert YYYYMM to MMMYY
Python 3, 70 bytes
from time import*
lambda s:strftime("%b%y",strptime(s,"%Y%m")).upper()
This uses the built-in strftime and ...
26
votes
Accepted
Sleep for 1000 years
MATL, 6 5 bytes
35WY.
This waits for 34359738368 seconds, which is a little more than 1089 years and a half.
Don't try it online!
Explanation
...
24
votes
24
votes
Encode the date in Christmas Eve format
Excel formula, 59 bytes
="Christmas"&REPT(" Eve",DATE(YEAR(NOW()+6),12,25)-TODAY())
23
votes
Sleep for 1000 years
Ruby, 10 bytes
sleep 3e10
Try it online!
There are approximately \$3*10^{10}\$ seconds in a thousand years.
22
votes
Accepted
The symmetry of months
JavaScript (ES6), 55 bytes
Saved 6 bytes thanks to @Neil
Takes input in currying syntax (year)(month). Returns false for ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
date × 280code-golf × 269
string × 33
kolmogorov-complexity × 17
number × 15
ascii-art × 15
decision-problem × 9
math × 8
arithmetic × 8
conversion × 7
popularity-contest × 5
natural-language × 5
array × 4
primes × 4
sorting × 4
graphical-output × 3
parsing × 3
palindrome × 3
unicode × 3
pi × 3
roman-numerals × 3
interactive × 3
code-challenge × 2
sequence × 2
geometry × 2