25
1
It is common to start countdowns 100 days prior to an event, probably because of our base 10 system. Examples of this can be found everywhere:
- 100 days until your birthday
- 100 days until the wedding
- 100 days until the election
- 100 days until our graduation
- 100 days until her due date
- 100 days until football season
- 100 days until you get the Fanatic badge
You get the picture. It seems that the 100th day before an event is second place only to the actual event. So for this challenge, I need to know what the date will be in 100 days, so that I can determine what I should start counting down too.
Input
No input
Output
The date 100 days from the current date based on the standard Gregorian Calendar (Make sure to account for leap years). Output is flexible as long as the date format is human read-able (eg 2016-10-8
, 10-8-16
, [ 2016, 10, 8 ]
, 10/8/16 12:00:00 AM
).
Winning
Code golf: shortest code in bytes
Examples
100 days from today (Apr 5th, 2017) is Friday, July 14 2017.
Current Future
------- ------
01/01/2001 +100 04/11/2001
01/01/2004 +100 04/10/2004
01/01/1900 +100 04/11/1900
01/01/2000 +100 04/10/2000
07/04/2017 +100 10/12/2017
10/31/2017 +100 02/08/2018
12/25/2017 +100 04/04/2018
08/29/1941 +100 12/07/1941
06/03/2001 +100 09/11/2001
2Can I add the current time to the output? – Titus – 2017-04-06T04:05:33.650
1@Titus no, just the future date – NonlinearFruit – 2017-04-06T10:30:52.747
1Most answers include a date and time now, I think this should be allowed. – G B – 2017-04-06T12:25:17.350
1@GB When you output the future date, the format is flexible (could include timestamp) as long as it is human readable. However, current time/date is not acceptable. – NonlinearFruit – 2017-04-06T12:27:09.403
5"Because of our bas 10 system"? No, if we counted in binary, we'd likely count down from 100 - except that would take only four days, rather than a hundred... – Toby Speight – 2017-04-06T12:54:51.437
1
10/8/16
is not human readable, it can be2010-08-16
,2016-08-10
or2016-10-08
. Please avoid this date format – 12431234123412341234123 – 2017-04-07T10:53:08.2831@12431234123412341234123 this format is perfectly readable for me (in fact, it's pretty much a de-facto standard where I live). It all depends on where you're from. – Cássio Renan – 2017-04-08T20:30:38.733
@CássioRenan It can not be, because it can be read in 3 different ways. it is not possible to be readable without more informations. (or from where do you know which of this 3 possible formats are used) – 12431234123412341234123 – 2017-04-09T04:56:31.653
1@12431234123412341234123 that's not a good point. In fact,
2010-08-16
,2016-08-10
and2016-10-08
are also ambiguous. In my case they're much worse: Since there's no date format where I live that starts with a year, I have no way of knowing whether these formats are day/month or month/day. Something being human-readable implies language/convention. In the case of a flexible question such as this one, this means you have to specify the format, along with the date, much like you would do with other types of data. Forbidding a format just because you cannot read it is just rude. – Cássio Renan – 2017-04-10T16:49:30.183@CássioRenan The problem is not that i can not read this format, the problem is there are 3 different used formats which all lock the same. And no one use
YYYY-DD-MM
(it is also the only format which make sense, since it is complete Bigendian and not mixed). To the language language convention, there are english speaking countrys which areDD/MM/YY
used mostly and other english speaking whereMM/DD/YY
used mostly, so there is no convention which you can count on (so this format is not distinct and therefor can not be readable). – 12431234123412341234123 – 2017-04-11T10:39:24.160