13 questions linked to/from Is it a leap year?
Is it a leap year? Use only assignments and arithmetic expressions [duplicate]
Write a program that outputs 1 when the year is a leap year, otherwise 0. You can use any programming language, but use only assignments and arithmetic expressions for the calculation. The Gregorian ...
Showcase of Languages
Notes This thread is open and unlocked only because the community decided to make an exception. Please do not use this question as evidence that you can ask similar questions here. Please do not ...
Golf all the 16 logic gates with 2 inputs and 1 output!
For example, the gate A and B is a logic gate with 2 inputs and 1 output. There are exactly 16 of them, because: each logic gate takes two inputs, which can be ...
Print last inputted byte
Challenge You have one string of input bytes, output only the last byte in it. Rules Your submission may be a program or function outputting the last byte in the input which is either a string, stdin ...
Encode the date in Christmas Eve format
The day this post was published was Christmas Eve. Tomorrow will be Christmas. Yesterday was Christmas Eve Eve. In two days it will be ...
What year will it be in n seconds?
You are given an integer n as input, and, regardless of the current date, must return the calendar year (Gregorian calendar, other calendars not allowed) taking ...
The Work Day Countdown
I just had a genius idea for making the work-life easier - a countdown to a specific date which only counts workdays. The basic task is to create a countdown to a specific date which only includes ...
Stackylogic is a logic-based programming language I made up that take in 0's and 1's for input and outputs a single ...
Calculate the day number of the year
Seems like we do not have this one yet, so here we go: The Challenge Write a program or function that takes a date as input and outputs the day number of the year. You may not use any builtins for ...
Days and months make years
Today's date is quite an interesting one. Let's take a look at why. The date 07/12/2017 (in DD/MM/YYYY date format) can be split ...
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: ...
Find the date that is n days from January 1st 1984
This challenge is a relatively simple concept that I'm surprised has not been done yet. You will be given only an integer as an input. Your task is to find the date that is this number of days from ...
Year progress bar
Create a progress bar indicating year progress Your code has to output the percentage of the year already passed form 1st of January of the current year. You have to display a progress bar and the ...