16
2
In this challenge you will need to determine whether it's Pi Day, Pi Minute, or Pi Second.
Because Pi is irrational, it wants your code to be as short as possible.
Examples
No input is provided, your program should use the system time. I've just added it for clarity
March 14, 2016 0:00:00
Pi Day
December 25, 2015 3:14:45
Pi Minute
December 29, 2015 0:03:14
Pi Second
January 1, 2016 0:00:00
<No Output>
What is Pi Day / Minute / Second
Pi Day
is when the month is March, and the date is the 14thPi Minute
is when the hour is 3, and the minute is 14Pi Second
is when the minute is 3, and the second is 14Pi Day
should be preferred instead ofPi Minute
orPi Second
, andPi Minute
should be preferred instead ofPi Second
.- For this challenge you should use 12-hour time (15:14 == 3:14). The date/time used to determine the
Pi Day/Minute/Second
should be based on system time.
Scoring & Bonus
-15 byte Bonus: If you print "No Pi Time"
when it's not Pi time.
As always, standard loopholes are disallowed. This is code-golf shortest code in bytes wins!
6I don't think Costco allows you to purchase the mathematical constant pi at any time of the year. – Alex A. – 2016-01-02T01:35:44.320
2You've changed it to regular pie. That's also false because you can get pie from Costco all year. – Alex A. – 2016-01-02T01:39:52.987
1@AlexA. Hmm, weird I can never find it in the summer... – Downgoat – 2016-01-02T01:40:44.390
1Because pi is infinitely long and you want to be passive-aggressive? – Arcturus – 2016-01-02T01:53:27.743
Would
"Pi day"
,"Pi month"
, etc. be accepted also? – Zach Gates – 2016-01-02T03:48:49.8571@ZachGates
Pi month
doesn't exist but to answer your question, no, the output must be the correct case – Downgoat – 2016-01-02T03:49:51.6538I went to Costco today - they were closed. – Digital Trauma – 2016-01-02T05:18:58.697
@DigitalTrauma why did you go – undergroundmonorail – 2016-01-02T07:45:42.373
@undergroundmonorail To buy pies – Digital Trauma – 2016-01-02T16:35:27.843
1@AlexA. Sure you can - any time you buy a tire or any other circular object, you're buying 2π. – Digital Trauma – 2016-01-02T16:47:00.870
I think you can't have Pi Minute and Pi Second at the same time, so there's no point in preferring either one. – PurkkaKoodari – 2016-01-02T23:52:54.017
Nothing special if it's March 14 2015 9:26:53? – user253751 – 2016-01-03T02:34:42.263
@DigitalTrauma but they were closed – undergroundmonorail – 2016-01-03T06:42:13.883
1@immibis Or March 14 1592 6:53:58? – wizzwizz4 – 2016-01-03T09:11:50.733