Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • 2
    \$\begingroup\$ Fairly sure that your answer doesn't meet the requirements of the prompt, namely the last rule due to you using $Version: Your program may not use a builtin, macro, or custom compiler flags to determine the language version. \$\endgroup\$ Commented Aug 16, 2017 at 14:06
  • 8
    \$\begingroup\$ I'm only using $Version to demonstrate that it outputs the correct result in the correct version, $Version is not part of my answer... \$\endgroup\$ Commented Aug 16, 2017 at 14:07
  • \$\begingroup\$ All good friend - the thing is, you are using something like $VersionNumber, but instead you're calling it $Version. To my mind, while the meat of your program is the Length@DateRange stuff, that wouldn't work without $Version just providing the full version information that you then process, which therefore violates the rules. \$\endgroup\$ Commented Aug 16, 2017 at 14:12
  • 4
    \$\begingroup\$ @Amndeep7 The submission is the 37 byte code inlined in the first paragraph. The code blocks are only output demonstrations. \$\endgroup\$ Commented Aug 16, 2017 at 14:16
  • 3
    \$\begingroup\$ Explanation: Using different format of time in different versions. That can be golfed more to {1} Tr[1^#&@@%~DateRange~%]/3+9 (31 bytes), or even 7+Length@Now (12 bytes) \$\endgroup\$ Commented Aug 17, 2017 at 8:34