Happy Rounded Pi Day

C, 32 bytes

#define f(d)d*time(0)/464083315.

If losing a little more accuracy is fine, I can get it down to about 29 bytes being still accurate to 4 digits past the decimal (as of the time of this posting):

#define f(d)d*time(0)/46408e4

AppleScript, 122 120 bytes

set a to current date
(display dialog""default answer"")'s text returned*(month of a+day of a*.01+year of a*1e-4 mod.01)

Variable a

Variable a is a date object. I call all of my date information off of it.

Month, day, and year

The month, day, and year calls actually return an object that normally returns a string. To properly use it as a number, I have surrounded it on both sides with mathematical operations to automatically cast it to a number.

1e-4

1e-4 is a byte shorter than .0001.

mod.01

. acts as a separator to the AppleScript autocorrect. By using this, I can use modulo and still keep it a byte for myself.

No return statement/log

The last value calculated automatically is returned by the program. I output the number calculated via the return box.

And here's a gif of it running!

pi day gif


Mathematica + coreutils, 20 bytes

<<"!date +%m.%d%y"#&

Luckily, Mathematica interprets the output of an external command as an expression. In this case the output is a valid float, so that multiplication with the function argument # is implied.