All Questions
272
questions
16
votes
7
answers
4k
views
How many people are awake?
The following data contains the (approximate) population of each UTC timezone in the world (source):
...
12
votes
10
answers
1k
views
Format Datetime in 30-Hour Clock Time
Input a datetime, format the datetime in YYYY-MM-DD HH:mm:ss format using 30-hour clock time.
The 30-hour clock time works as:
After 6 a.m., it is same as 24-hour ...
7
votes
6
answers
386
views
Output 5-line calendar
Given year, month and optionally weekday of 1st, output the calendar of the month. The first week should remain nonempty.
For empty cell, fill it with the date where it's supposed to be, in last or ...
11
votes
3
answers
616
views
Write the date in abbreviated Latin
Inspired by How do you write dates in Latin?
Challenge
Given a month-and-day date, output that date in abbreviated Latin, as explained below.
Input
Input is flexible, following conventions from other ...
15
votes
22
answers
2k
views
Decode the date in Christmas Eve format
This is the inverse of "Encode the date in Christmas Eve format."
Write a program that takes as input the string Christmas, possibly followed by ...
18
votes
21
answers
2k
views
Last Week Day Of The Month
Introduction
This challenge was inspired by a seemingly simple task requested at work that couldn't easily be done in Microsoft Teams. At least not from what we could find!
Task
Your task, if you ...
11
votes
6
answers
1k
views
Spell date in Japanese
Objective
Given a date, spell it out in Romanized Japanese.
I/O Format
The input format is flexible. The output format is <month spelling> <day spelling>...
24
votes
45
answers
3k
views
Output each second
With roughly one second (plus or minus 10 ms) between outputs, output anything.
The first output must be at most one second after the start of the program, but can be as soon as right when the program ...
1
vote
4
answers
275
views
Get the date of the Nth day of week after the Xth day of week in a given year and month
Introduction
In the United States, national elections are normally held on the first Tuesday after the first Monday in November.
Challenge
Write a program that takes a Year as integer, and a pair of (...
9
votes
5
answers
433
views
Next Time Of Given Pattern
Introduction:
Some times using a 24-hour clock are formatted in a nice pattern. For these patterns, we'll have four different categories:
...
20
votes
31
answers
3k
views
Which weekday was it?
This challenge, I hope, is simple to understand. Given a date-string (given in any format you prefer, so long as it has 4 digits of year and 2 digits of day and month), calculate the weekday for the ...
5
votes
4
answers
792
views
Which Western Zodiac sign is today?
Task:
With the minimum amount of bytes, determine today's Zodiac sign using the programming language of your choice.
Rules:
This is code golf, the answer with the fewest characters wins. The ...
14
votes
7
answers
597
views
Implement OADD_MONTHS
Introduction
A function that adds months to a date (without overflowing ends of months) is implemented in many languages/packages. In Teradata SQL it's ADD_MONTHS, here are some examples:
...
15
votes
11
answers
987
views
Which Advent is it?
I know, a bit late.
Challenge
Your challenge is, given a date, output if it's not an Advent Sunday, or the Advent Sunday of the year.
Rules
The \$4^\text{th}\$ Advent is determined by the Sunday ...
67
votes
52
answers
8k
views
Increment The Time
Every digital clock contains a small creature that has to advance the time every minute [citation needed]. Due to the popularty of digital clocks and the popularity of catching them in the wild, they ...