Skip to main content

Timeline for Get the century of a year

Current License: CC BY-SA 4.0

5 events
when toggle format what by license comment
Sep 12, 2020 at 2:24 comment added Xcali Here's a 13 byte solution that doesn't use any command line module inclusions.
Jul 23, 2018 at 19:18 comment added Sundar R @DomHastings That's what the |0 in the JS answer was for! (Trying to learn Brachylog left me seeing "alternate predicate" instead of "coerce to int" there.) Thank you. Just in case you're able to make something of it, here's the regex approach that I started with: /..?$/;$_=$`+($&>0) (I'm now trying to see if I can learn enough Retina to implement this in that).
Jul 23, 2018 at 19:13 history edited Sundar R CC BY-SA 4.0
added 72 characters in body
Jul 23, 2018 at 19:08 comment added Dom Hastings Solid answer, cant think of a shorter approach right now! You can drop the parens on ceil for -2 and reorder the first using |0 for a few savings too: Try it online!
Jul 23, 2018 at 18:43 history answered Sundar R CC BY-SA 4.0