text:
Trithagorean Triples
A Pythagorean Triple is a positive integer solution to the equation:

A Trithagorean triple is a positive integer solution to the equation:

Where Δn finds the nth triangular number.  All Trithagorean triples are also solutions to the equation:

Task
Given a positive integer c, output all the pairs of positive integers a,b such that the sum of the ath and bth triangular numbers is the cth triangular number.  You may output the pairs in whatever way is most convenient.  You should only output each pair once.
This is code-golf
Test Cases
2: []
3: [(2, 2)]
21: [(17, 12), (20, 6)]
23: [(18, 14), (20, 11), (21, 9)]
78: [(56, 54), (62, 47), (69, 36), (75, 21), (77, 12)]
153: [(111, 105), (122, 92), (132, 77), (141, 59), (143, 54), (147, 42), (152, 17)]
496: [(377, 322), (397, 297), (405, 286), (427, 252), (458, 190), (469, 161), (472, 152), (476, 139), (484, 108), (493, 54), (495, 31)]
1081: [(783, 745), (814, 711), (836, 685), (865, 648), (931, 549), (954, 508), (979, 458), (989, 436), (998, 415), (1025, 343), (1026, 340), (1053, 244), (1066, 179), (1078, 80), (1080, 46)]
1978: [(1404, 1393), (1462, 1332), (1540, 1241), (1582, 1187), (1651, 1089), (1738, 944), (1745, 931), (1792, 837), (1826, 760), (1862, 667), (1890, 583), (1899, 553), (1917, 487), (1936, 405), (1943, 370), (1957, 287), (1969, 188)]
2628: [(1880, 1836), (1991, 1715), (2033, 1665), (2046, 1649), (2058, 1634), (2102, 1577), (2145, 1518), (2204, 1431), (2300, 1271), (2319, 1236), (2349, 1178), (2352, 1172), (2397, 1077), (2418, 1029), (2426, 1010), (2523, 735), (2547, 647), (2552, 627), (2564, 576), (2585, 473), (2597, 402), (2622, 177), (2627, 72)]
9271: [(6631, 6479), (6713, 6394), (6939, 6148), (7003, 6075), (7137, 5917), (7380, 5611), (7417, 5562), (7612, 5292), (7667, 5212), (7912, 4832), (7987, 4707), (8018, 4654), (8180, 4363), (8207, 4312), (8374, 3978), (8383, 3959), (8424, 3871), (8558, 3565), (8613, 3430), (8656, 3320), (8770, 3006), (8801, 2914), (8900, 2596), (8917, 2537), (9016, 2159), (9062, 1957), (9082, 1862), (9153, 1474), (9162, 1417), (9207, 1087), (9214, 1026), (9229, 881), (9260, 451), (9261, 430), (9265, 333)]

Can we output repeated pairs? Example, for 21 output [(17, 12), (20, 6), (12, 17), (6, 20)]

I thought you were asking us to find a^3+ b^3 = c^3. :D

@LuisMendo No.  I'll include this in the question.

@BetaDecay MATL, 0 bytes

@LuisMendo Is that a joke or something?

@EriktheOutgolfer a^3+ b^3 = c^3 is known to have no integer solutions; see Fermat's last theorem

Can I/O be 1-indexed?

Nevermind, you're starting the sequence at 1, not 0.

(other than the trivial solutions where one of a, b, c equals 0)

Mathematica, 53 49 48 bytes
Solve[{x.(x+1)==#^2+#,a>=b>0},x={a,b},Integers]&

Example:
In[1]:= Solve[{x.(x+1)==#^2+#,a>=b>0},x={a,b},Integers]&[21]

Out[1]= {{a -> 17, b -> 12}, {a -> 20, b -> 6}}

ooohh, nice vectorization, way better than what I would have done

MATL, 17 13 bytes
:Ys&+G:s=R&fh

Each pair is output with the smaller number first.
Try it online!
Explanation
Consider input 3.
:      % Implicitly input n. Push [1 2 ... n]
       % STACK: [1 2 3]
Ys     % Comulative sum
       % STACK: [1 3 6]
&+     % All pairwise sums
       % STACK: [2 4 7; 4 6 9; 7 9 12]
G:s    % Push 1+2+...+n
       % STACK: [2 4 7; 4 6 9; 7 9 12], 6
=      % Is equal?
       % STACK: [0 0 0; 0 1 0; 0 0 0]
R      % Upper triangular part of matrix. This removes duplicate pairs
       % STACK: [0 0 0; 0 1 0; 0 0 0]
&f     % Push row and column indices (1-based) of non-zero entries
       % STACK: 2, 2
h      % Concatenate horizontally. Implicitly display
       % STACK: [2, 2]

Explanation please?

@EriktheOutgolfer Sure, I'll add it later in the day

Just make sure you output the unique pairs, that mainly why I asked.

@EriktheOutgolfer Yes, they are unique (R takes care of that)

@EriktheOutgolfer Explanation added

Jelly, 12 bytes
j‘c2ḅ-
ŒċçÐḟ

Try it online!
How it works
ŒċçÐḟ   Main link. Argument: c

Œċ      Yield all 2-combinations w/repetition of elements of [1, ..., c].
  çÐḟ   Filterfalse; keep only 2-combinations for which the helper link returns 0.

j‘c2ḅ-  Helper link. Left argument: [a, b]. Right argument: c

j       Join [a, b] with separator c, yielding [a, c, b].
 ‘      Increment; yield [a+1, c+1, b+1].
  c2    Combination count; compute [C(a+1,c), C(c+1,c), C(b+1,c)], yielding
        [½a(a+1), ½c(c+1), ½b(b+1)].
    ḅ-  Convert from base -1 to integer, yielding
        ½(-1)²a(a+1) + ½(-1)¹c(c+1) + ½(-1)⁰b(b+1) = ½(a(a+1) - c(c+1) + b(b+1)),
        which is 0 if and only if a(a+1) + b(b+1) = c(c+1).

AWK, 72 bytes
{for(n=$1;++i<=n;)for(j=i;j<=n;++j)if(i^2+j^2+i+j==n^2+n)$0=$0" "i":"j}1

Try it online!
Output is c a1:b1 a2:b2 ....  The TIO link has 4 extra bytes i=0; to allow for multiline input.
This isn't efficient at all, but it works. :)

Jelly, 16 14 bytes
RS
ŒċÇ€S$⁼¥ÐfÇ

Try it online!
This is too long for sure...
Explanation:
ŒċÇ€S$⁼¥ÐfÇ (main) Arguments: z
Œċ             Return [[1, 1], [1, 2], ..., [1, z], [2, 2], ..., [z, z]]
          Ç    Return T(z)
  Ç€S$⁼¥Ðf     Only keep the pairs such as ΣT(a, b)=T(z)

RS (helper 1) Arguments: z
R  [1, 2, ..., z]
 S Take the sum

Python 2, 69 bytes
Try it online
lambda c:[(a,b)for a in range(c)for b in range(a+1)if~a*a==c*~c-~b*b]

-9 bytes, thanks to @WheatWizard

And ~a*a==c*~c-~b*b is a byte shorter than that. Try it online!

@WheatWizard Good stuff :D

PHP, 94 Bytes
for($a=$c=$argn;$a--;)for($b=$a;$b;$b--)$a**2+$a+$b**2+$b!=$c**2+$c?:$e[]=[$a,$b];print_r($e);

Try it online!

Haskell, 50 bytes
f c=[(a,b)|a<-[1..c],b<-[1..a],a^2+a+b^2+b==c^2+c]

Usage example: f 21 -> [(17,12),(20,6)]. Try it online!
Uses the 2nd equation.

Axiom, 281 204 196 191 bytes
q(b,m)==(r:=1+4*m;v:=4.*b*(b+1);r<v=>0;(sqrt(r-v)-1)/2);g(c:NNI):Any==(r:List List INT:=[];i:=0;repeat(i:=i+1;i>=c=>break;w:=q(i,c^2+c);w>=i and fractionPart(w)=0=>(r:=cons([w::INT,i],r)));r)

test and ungolf
-- if m=c^2+c than a^2+a+b^2+b-m=0 has the solutions [a,b] with a>0,b>0
-- if it is used a=(-1+sqrt(1+4*m-4*(b)*(b-1)))/2 because the other return a<0
-- o(b,m) return that solution if 1+4*m-4*(b)*(b-1)>0 [so exist in R sqrt] else return 0
o(b,m)==(r:=1+4*m;v:=4.*b*(b+1);r<v=>0;(sqrt(r-v)-1)/2)

--it Gets one not negative integer c; return one list of list(ordered) of 2 integers
--[a,b] with  a^2+a+b^2+b=c^2+c
gg(c:NNI):List List INT==
   r:List List INT:=[]  -- initialize the type make program more fast at last it seems 10x
   i:=0
   repeat
      i:=i+1
      i>=c=>break
      w:=o(i,c^2+c)
      w>=i and fractionPart(w)=0=>(r:=cons([w::INT,i],r))
   r

(6) -> [[i,g(i)]  for i in [2,3,21,23,78,153,496,1081,1978,2628,9271]]
   (6)
   [[2,[]], [3,[[2,2]]], [21,[[17,12],[20,6]]], [23,[[18,14],[20,11],[21,9]]],
    [78,[[56,54],[62,47],[69,36],[75,21],[77,12]]],
    [153,[[111,105],[122,92],[132,77],[141,59],[143,54],[147,42],[152,17]]],

     [496,
       [[377,322], [397,297], [405,286], [427,252], [458,190], [469,161],
        [472,152], [476,139], [484,108], [493,54], [495,31]]
       ]
     ,

     [1081,
       [[783,745], [814,711], [836,685], [865,648], [931,549], [954,508],
        [979,458], [989,436], [998,415], [1025,343], [1026,340], [1053,244],
        [1066,179], [1078,80], [1080,46]]
       ]
     ,

     [1978,
       [[1404,1393], [1462,1332], [1540,1241], [1582,1187], [1651,1089],
        [1738,944], [1745,931], [1792,837], [1826,760], [1862,667], [1890,583],
        [1899,553], [1917,487], [1936,405], [1943,370], [1957,287], [1969,188]]
       ]
     ,

     [2628,
       [[1880,1836], [1991,1715], [2033,1665], [2046,1649], [2058,1634],
        [2102,1577], [2145,1518], [2204,1431], [2300,1271], [2319,1236],
        [2349,1178], [2352,1172], [2397,1077], [2418,1029], [2426,1010],
        [2523,735], [2547,647], [2552,627], [2564,576], [2585,473], [2597,402],
        [2622,177], [2627,72]]
       ]
     ,

     [9271,
       [[6631,6479], [6713,6394], [6939,6148], [7003,6075], [7137,5917],
        [7380,5611], [7417,5562], [7612,5292], [7667,5212], [7912,4832],
        [7987,4707], [8018,4654], [8180,4363], [8207,4312], [8374,3978],
        [8383,3959], [8424,3871], [8558,3565], [8613,3430], [8656,3320],
        [8770,3006], [8801,2914], [8900,2596], [8917,2537], [9016,2159],
        [9062,1957], [9082,1862], [9153,1474], [9162,1417], [9207,1087],
        [9214,1026], [9229,881], [9260,451], [9261,430], [9265,333]]
       ]
     ]
                                                      Type: List List Any

J, 35 bytes
1+[:~.,~/:~@#:[:I.@,@({:=+/~)2!2+i.

Try it online!

JavaScript (ES6), 83 bytes
c=>[...Array(c*c)].map((_,x)=>[x%c,x/c|0]).filter(([a,b])=>a>=b&a++*a+b++*b==c*c+c)

Test cases
Omitting here the largest inputs that take too much time for the snippet.

let f =

c=>[...Array(c*c)].map((_,x)=>[x%c,x/c|0]).filter(([a,b])=>a>=b&a++*a+b++*b==c*c+c)

console.log(JSON.stringify(f(2)))
console.log(JSON.stringify(f(3)))
console.log(JSON.stringify(f(21)))
console.log(JSON.stringify(f(23)))
console.log(JSON.stringify(f(78)))
console.log(JSON.stringify(f(153)))
console.log(JSON.stringify(f(496)))

CJam, 30 28 bytes
{_,2m*:$_&f+{{_)*}%~+=},1f>}

Anonymous block expecting its argument on the stack and leaving the result on the stack.
Try it online!
Explanation
I will refer to the input as n
_,     e# Copy n, and get the range from 0 to n-1.
2m*    e# Get the 2nd Cartesian power of this range.
:$_&   e# Sort the pairs and deduplicate, to get all unique pairs.
f+     e# Prepend n to each pair.
{      e# Filter these triplets; keep only those that give a truthy result:
 {     e#  Map this block over the triplet:
  _)*  e#   Multiply x by x+1. (i.e. x^2 + x)
 }%    e#  (end map)
 ~+=   e#  Check if the sum of the second and third is equal to the first.
},     e# (end filter)
1f>    e# Remove the first element from all remaining triplets.

Pyth - 23 21 bytes
L*bhbfqyQ+yhTyeT.CUQ2

Try it
L*bhbfqyQ+yhTyeT.CUQ2
L*bhb                     Define y(b)=b*(b+1)
                .CUQ2     All pairs of numbers less than the input
     fqyQ+yhTyeT          Filter based on whether y(input) == y(1st elem. of pair) + y(2nd elem. of pair)

Husk, 12 11 bytes
fo=Σ¹ṁΣüOπ2

Try it online!
Σ has a mode where it returns the nth triangular number, which is very useful here.
-1 byte from Dominic van Essen.
Explanation
fo=Σ¹ṁΣüOπ2
         π2  cartesian power 2 for range 1..n(all possible pairs)
       üO    uniquify, ignoring ordering
fo           filter by the following 2 functions:
     ṁΣ      triangular numbers of the pair summed
  =          equals
   Σ¹        nth triangular number?

11 bytes without the ḣ (using cpowN function of π)

Obviously that's a thing aaaaaa


text:
Is this relationship creepy?
According to this XKCD comic, there is a formula to determine whether or not the age gap in a relationship is "creepy". This formula is defined as:
(Age/2) + 7

being the minimum age of people you can date.
Therefore a relationship is creepy if either of the people in said relationship are younger than the minimum age of the other.
Given the age of two people, can you output whether or not that relationship is creepy?
Rules

Your program should take two integers as input, the age of both people in the relationship. These can be taken in any reasonable format.
Your program must then output a truthy or falsy value describiing whether or not the relationship is "creepy" (Truthy = Creepy).
Standard loopholes are not allowed.
This puzzle is Code Golf, so the answer with the shortest source code in bytes wins

Test Cases
40, 40    - Not Creepy
18, 21    - Not Creepy
80, 32    - Creepy
15, 50    - Creepy
47, 10000 - Creepy
37, 38    - Not Creepy
22, 18    - Not Creepy

How should age/2 be rounded? Probably up if the exact half is supposed to be the minimum? 17,21 would make a good test case.

@MartinEnder The value is a minimum, so do not round at all. It doesn't have to be an integer.

@FishProHD can we require a certain input order (i.e. largest first)

You could also add 13, 13 - Creepy.

47, 10000 is an... interesting combination. I would also like to point out that according to this formula, it is creepy for Doctor Who to date any human.

@DavidConrad - well yeah. its basically beastiality on his part....

I hate to be a puritan about it but 17-20 is very-easily creepy.

Would you mind updating the accepted answer?

Done! Sorry about the delay didn't check it in a while.

An important test case is, for example, 21, 29 - Creepy. If you do integer division you get it wrong.

This post is like 5 months old @Max

Had to take a second look after seeing the title to make sure I wasn't on IPS...

any age below 14 is creepy.

Jelly, 6 bytes
H+7>ṚṀ

Try it online!
Seemingly different algorithm than Comrade's.

Well, its the same now... ;p

@Draco18s It was always the same with the earlier 05AB1E submission though.

NAND gates, 551

Created with Logisim
Same principle as my other answer, but takes 2-byte signed inputs, so it can handle 47, 10000. Works for ALL test cases!
This is not optimal for the given test cases, as 10000 can be expressed with only 15 of the 16 bits, but it works for any ages in the range [-32768, 32768). Note that any negative age will return 1.
Inputs on left (no particular order, 1-bit on top). Output in lower right.

Python 3, 26 bytes
lambda x:max(x)/2+7>min(x)

Try it online!
The input is a list with both ages

Had the same before I read existing answers. +1

It appears you could actually assume a tuple where it's always (younger,older) - just asked OP - wonder what he'll say.

@rm-vanda I asked earlier, you can't assume

NAND gates, 274 262
Original:

Better:

Created with Logisim
This takes two inputs on the left as 1-byte signed integers, with the 1-bit at the top. Output is in the lower left; the truthy and falsey here should be obvious.
Works for all test cases except 47, 10000, so I guess this is technically not a valid answer. However, the oldest person on (reliable) record was 122, so 8 bits (max 127) will work for any scenario ever possible to this point. I'll post a new answer (or should I edit this one?) when I finish the 16-bit version.
16-bit version is done!
You'll notice some vertical sections of the circuit. The first one (from the left) determines which input is greater. The next two are multiplexers, sorting the inputs. I then add 11111001 (-7) to the lesser in the fourth section, and I conclude by comparing twice this to the greater input. If it is less, the relationship is creepy. Since I shift the bits to double, I must take into account the unused bit of lesser-7. If this is a 1, then lesser-7 is negative, and the younger of the two is no older than six. Creepy. I finish with an OR gate, so if either creepiness test returns 1, the entire circuit does.
If you look closely, you'll see that I used seven one constants (hardcoding the 11111011 and the trailing 0). I did this because Logisim requires at least one value going in for a logic gate to produce an output. However, each time a constant is used, two NAND gates ensure a 1 value regardless of the constant.
-12 gates thanks to me!

Noticed an obvious optimization. If you point it out before I edit, I'll still credit you!

05AB1E, 8 6 bytes
;7+R‹Z

Try it online! or Try all test
         # Implicit Input: an array of the ages
;        # Divide both ages by 2
 7+      # Add 7 to both ages
   R     # Reverse the order of the ages
         #    this makes the "minimum age" line up with the partner's actual age
    ‹    # Check for less than the input (vectorized)
     Z   # Push largest value in the list

As a C programmer I agree that 2 is truthy.

@gmatht This should always return either 0 or 1, never 2.

[13,13] is doubly creepy.

@gmatht I guess that would be double. I didn't think about numbers that small. It's still truthy though.

@Riley 2 is not truthy, see this.

@Okx 2 is not truthy, we shouldn't use __ to determine truthiness, we should use i1ë0}.

@EriktheOutgolfer I don't understand.

@Okx Riley probably assumed 2 is truthy, or used __, while _ considers 2 to be truthy, while consensus says it must behave like truthy on if statements, so i1ë0} is the perfect truthiness checker to use here.

@EriktheOutgolfer May I say again that should use isn't in a golfer's dictionary? Whatever works, works.

@EriktheOutgolfer I'm not using __ to check for truthyness, I'm using it to translate 0->0, 1->1, and 2->1 which will make the output match the if statement definition of truthy/falsy.

@Riley I wasn't talking about the use of __ here.

@EriktheOutgolfer Okay. I guess I'm just confused about what you guys are talking about.

@Riley We were talking about how you assumed 2 is truthy at first, and a potential way so that you never face the issue again. Coincidentally, it involved the use of __ too (since Ā was added after the challenge).

@Riley Z or P works :P.

C#, 22 bytes
n=>m=>n<m/2+7|m<n/2+7;

I'm not much of a C# programmer, but is the final semicolon required as part of the function?

@OlivierGrégoire It's just invalid syntax if it's omitted; this is an anonymous function

C, 29 bytes
#define f(a,b)a/2+7>b|b/2+7>a

How it works:

#define f(a,b) defines a macro function f that takes two untyped arguments.
a/2+7>b checks if the first age divided by two plus seven is larger than the second age.
b/2+7>a checks if the second age divided by two plus seven is larger than the first age.
If either of the above values are true, return 1 (creepy). Otherwise, return 0 (not creepy).

Try it online!

you should flip the comparison, it should be like >b not <b

Quote "being the minimum age" means you have to check if age >= min, also you need AND instead of OR, since both sides has to satisfy in order for it to not be creepy, test case "47, 10000 - Creepy"

okay I've fixed the error, but the logic is wrong, it return true, tio.run

@Khaled.K Hm, fixed.

@Tas nope.

Cheers, thanks for the link

JavaScript (ES6), 21 bytes
a=>b=>a<b/2+7|b<a/2+7

Returns 0 for not creepy, 1 for creepy.

f=a=>b=>a<b/2+7|b<a/2+7

console.log(f(40)(40));
console.log(f(18)(21));
console.log(f(80)(32));
console.log(f(15)(50));
console.log(f(47)(10000));
console.log(f(37)(38));
console.log(f(22)(18));

Save a byte with currying: a=>b=> instead of (a,b)=>, call with f(40)(40).

@StephenS, thank you, learned something new!

No problem, I learned it when someone told me the same thing :) it only works with two parameters though, after that it's not worth it.

R, 26 25 bytes
-1 byte thanks to @djhurio
any(rev(a<-scan())<a/2+7)

Try it online!

TI-Basic, 20 10 9 bytes
max(2Ans<14+max(Ans

-10 bytes by using a list and part of Timtech's suggestion
-1 byte using lirtosiast's suggestion
Takes in a list of two ages, "{40,42}:prgmNAME"
Returns 1 for 'creepy' and 0 for 'not creepy'.

Does TI-BASIC automatically close parentheses at a testing-symbol (< <= = != >= >)?

@Zacharý No, TI-Basic only closes parentheses at the end of a line or a colon.

Oh, whoops I forgot that the input was being taken as a list of numbers!

Python 3, 74 45 bytes
First Code Golf, probably terrible.
29 byte reduction by @Phoenix
lambda a,b:0 if(a/2)+7>b or(b/2)+7>a else 1

Hi, please be sure to properly format your code using the markdown system.

don't worry, someone beat me to it, ill fix it though

You can get rid of some of the spaces there :)

Also, lambda a,b:0 if(a/2)+7>b or(b/2)+7>a else 1 should work and is shorter by a lot.

i think the space before if can be left out as well as the one after else

lambda a,b:0if a/2+7>b or b/2+7>a else1...

lambda a,b:a/2+7>b or b/2+7>a. Abandon the burden of those pesky 1s and 0s and embrace the power of True/False!

Retina, 20 bytes
O`.+
^1{7}(1+)¶1\1\1

Try it online!
Input is in unary with a linefeed between the two numbers. Output is 0 (not creepy) or 1 (creepy).
Explanation
O`.+

Sort the two numbers, so we know that the larger one is second.
^1{7}(1+)¶1\1\1

Call the smaller age a and the larger age b. We first capture a-7 in group 1. Then we try to match 2*(a-7)+1 in b, which means b >= 2*(a-7)+1 or b >= 2*(a-7) or b/2+7 > a which is the criterion for a creepy relationship.

GNU APL 1.2, 23 bytes
Defines a function that takes two arguments and prints 1 if creepy, 0 if not.
∇A f B
(A⌊B)<7+.5×A⌈B
∇

Explanation
∇ begins and ends the function
A f B is the function header; function is named f and takes two arguments, A and B (functions in APL can be monadic - taking one argument - or dyadic - taking two arguments)
A⌊B is min(A,B) and A⌈B is max(A,B)
APL is evaluated right-to-left, so parentheses are needed to ensure proper precedence
The other operators are self explanatory.
Code might be golf-able, I'm still new to code-golf.

Welcome to the site!

Wow, nice, GNU APL, haven't seen that in a while.

Also, it's possible to take the arguments as a list: f X then (⌊/X)<7+.5×⌈/X. IIRC you can remove the newline between the second and third lines.

@Zacharý Yes, anonymous lambdas are possible. They are not supported by this version of GNU APL and the newer one does not compile on Mac. Some of my other answers use APL 1.7 because I test them on Ubuntu. I have not used lambdas (might fix them later) because I'm still pretty new to APL.

Try out ngn-apl. It's open-source like GNU APL, but in all honesty it's better.

Doesn't GNU APL use UTF-8? Anyway, in Dyalog APL, you can write this tacitly as ⌊<7+.5×⌈

@Adám I was not aware that you could give arguments implicitly; that’s pretty neat.

JavaScript (ES6), 27 bytes
f=a=>b=>b>a?f(b)(a):b>a/2+7

No currying (call like f(a,b) instead of f(a)(b))
f=(a,b)=>b>a?f(b,a):b>a/2+7

If b > a, swap parameters and retry. Otherwise, check. Currying doesn't save any bytes because of the recursive call.

f=a=>b=>b>a?f(b)(a):b>a/2+7

console.log(f(18)(22))
console.log(f(22)(18))
console.log(f(18)(21))

Excel, 26 24 Bytes
Cell formula that takes input as numbers from cell range A1:B1 and output a boolean value representing creepiness to the formula cell
=OR(A1/2+7>B1,B1/2+7>A1)

Old Version, 26 Bytes
=MAX(A1:B1)/2+7>MIN(A1:B1)

Java, 21 bytes
a->b->a/2+7>b|b/2+7>a

Absolutely not original.
Testing
Try it online!
import java.util.function.*;

public class Pcg122520 {
  static IntFunction<IntPredicate> f = a->b->a/2+7>b|b/2+7>a;
  public static void main(String[] args) {
    int[][] tests = {
      {40, 40},
      {18, 21},
      {80, 32},
      {15, 50},
      {47, 10000},
      {37, 38},
      {22, 18}
    };
    for (int[] test: tests) {
      System.out.printf("%d, %d - %s%n", test[0], test[1], f.apply(test[0]).test(test[1]) ? "Creepy" : "Not creepy");
    }
  }
}

+1 for mentioning "Absolutely not original.". Almost no one else does, while they are almost all the same. And I took the liberty of adding a TIO-link from your test code. Not sure why you always add a test code, but not a TIO-link?.. :)

Thanks Kevin! I sometimes do add one, sometimes not. It depends on whether I have my IDE open or closed. It's as simple as that! :P Also, I show the test code in order for people to understand what makes this lambda valid. :)

Python 3, 31 bytes
lambda a,b:abs(a-b)>min(a,b)-14
Not much shorter than the other python submissions, but I found a slightly different way to check for creepiness. I noticed that the acceptable difference between ages is equal to min - 14. This follows from algebraically rearranging the formula.
min = (max/2) + 7
min - 7 = max/2
2*min - 14 = max

dif = max - min
max = dif + min

2*min - 14 = dif + min
min - 14 = dif

This let me solve without needing two constants, and also without needing to use both max and min, instead using abs(a-b). From a golfing perspective I only got one byte less than @nocturama's solution, but I used a slightly different formula to do it.

Surely this fails on [37,53] (not in the test suite but) within the (x/2)+7 spirit of this fairway

@AlexxRoche Nope, when given [37,53] as [a,b], the calculation should become
abs(37 - 53) > min(37, 53) - 14 = abs(-16) > 37 - 14 = 16 > 23 = False
This is the correct answer, because according to (x/2) + 7, the minimum age for 53 is 53/2 + 7 = 26.5 + 7 = 33.5

Jq 1.5, 11 bytes
max/2+7>min

Try it online!

Mathics, 16 bytes
Max@#/2+7<Min@#&

Try it online!
-2 bytes thanks to @GregMartin
True for not creepy, false for creepy.
            (* Argument: A list of integers     *)
Max@#       (* The maximum of the input         *)
 /2+7       (* Divided by 2, plus 7             *)
  <         (* Is less than?                    *)
   Min@#    (* The minimum of the input         *)
    &       (* Anonymous function               *)

Save 2 bytes by taking the ages as a list: Max@#/2+7<Min@#&

TI-Basic, 10 9 10 bytes
2min(Ans)-14≤max(Ans

List input from Ans, outputs 1 if "creepy" or 0 otherwise.

SAS, 77 bytes
%macro t(a,b);%put%eval(%sysfunc(max(&a,&b))/2+7>%sysfunc(min(&a,&b)));%mend;

Batch, 50 bytes
@if %1 gtr %2 %0 %2 %1
@cmd/cset/a"%1*2-14-%2>>31

Outputs -1 for creepy, 0 for not creepy.
Since Batch only has integer arithmetic I have to work in units of half years.

+1 for the %0 %2 %1 and bypassing interget aritmetic.

Crystal, 44  27 bytes
-17 from looking at daniero's answer in Ruby.
def a(a)7+a.max/2>a.min end

Try it online!

Perl 6, 15 bytes
{.max/2+7>.min}

Try it
Expanded
{ # bare block lambda with implicit parameter ｢$_｣
  # (input is a List)

  .max / 2 + 7
  >
  .min
}

Python 3 - 32 27 bytes
Unable to comment, but I got a slightly shorter answer than the other Python 3 solution:
lambda *a:min(a)<max(a)/2+7

-5 thanks to @Cyoce!

you can remove the space in lambda *a

FORTH 96 Bytes
: C 2DUP > -1 = IF SWAP THEN 2 /  7 +  SWAP > -1 = IF ."  CREEPY " ELSE ." NOT CREEPY " THEN ;

Output:
40 40 c NOT CREEPY  ok
18 21 c
18 21 c NOT CREEPY  ok
80 32 c
80 32 c  CREEPY  ok
15 50 c
15 50 c  CREEPY  ok
47 10000 c
47 10000 c  CREEPY  ok
37 38 c
37 38 c NOT CREEPY  ok
22 18 c
22 18 c NOT CREEPY  ok

Thunno 2 G, 5 bytes
½7+r<

Attempt This Online!
Port of Riley's 05AB1E answer.
Explanation
½7+r<  # Implicit input
½      # Halve each value
 7+    # Add seven to each
   r   # Reverse the list
    <  # Vectorised less than
       # Get the maximum
       # Implicit output

K (oK), 16 bytes
{(x&y)<7+-2!x|y}

Try it online!

Nekomata + -e, 5 bytes
Ṁä7+≥

Attempt This Online!
Returns True for not creepy, False for creepy.
Ṁ        Get the maximum of the input
 ä       Divide it by 2
  7+     Add 7
    ≥    Is every element of the input greater than or equal to that?

Uiua, 8 bytes
<+7÷2⊃↥↧

Try it online!
<+7÷2⊃↥↧    input: two ages as two separate stack items
     ⊃↥↧    push max and min of the two ages
 +7÷2       max / 2 + 7
<           is greater than min?

Fourier, 37 bytes
oI~AI~B>A{1}{A~SA~BS~B}A/2+7>B{1}{@o}

Try it on FourIDE!
Takes two numbers as input. Will golf later.

It doesn't need to output a string like that, can be truthy or falsy

Nice golf. That was quick.

Japt, 11 bytes
Returns true for "creepy" and false for not.
wV /2+7>UmV

Try it online

Explanation
      :Implicit input of first integer U
wV    :Get the maximum of U and the second integer V
/2+7  :Divide by 2 & add 7
>     :Check if the result is greater than...
UmV   :the minimum of the two integers.

PHP, 29 Bytes
prints 1 for creepy, nothing for Not creepy

<?=max($_GET)/2+7>min($_GET);

Try it online!

As I understand the rules this fails on [34,19]

J, 10 bytes
<.<7+2%~>.

Outputs 1 for not creepy, 0 for creepy
Explanation
<.          NB. the minimum
  >         NB. is greater than
    7+2%~>. NB. half the maximum + 7

J-uby, 25 bytes
:>%[:min,:max|~:/&2|:+&7]

Call like f^[80,32]. Gives true for not creepy, false for creepy.
Explanation
    :min                  # the minimum
:>%[    ,               ] # is greater than
         :max|            # the maximum...
              ~:/&2|        # over two...
                    :+&7    # plus 7

This is a beautiful language. I spent a long time trying to accomplish similar ends with Ruby (I called it "Blurb"), but leaning heavily on method_missing led to too much complexity. This approach is clean and elegant. Congrats!

@Jordan thanks! I can't take all the credit, as this was heavily inspired by J (hence the name). I'm open to suggestions from a fellow Ruby programmer if you have any.

@Jordan you should see some of the other more complex J-uby answers. They're quite something.

AWK, 26 bytes
{$0=$1/2+7>$2||$2/2+7>$1}1

Try it online!
Outputs 1 for "Creepy" and 0 for "Not Creepy". Could save 3 bytes if no-output could be consider a falsy value, via:
$0=$1/2+7>$2||$2/2+7>$1

Swift - 33 bytes
var f={max($0,$1)/2+7>min($0,$1)}

A lambda-function's equivalent in Swift, but unfortunately cannot take an array :((. Outputs true for truthy and false for falsy. If one must not count the declaration of the function (Python doesn't) the byte count would be 27. Usage: print(f(age1,age2))
Check it out!

Röda, 16 bytes
{sort|[_<_/2+7]}

Try it online!
This is an anonymous function that takes input as two literals (not an array) from the input stream.
Explanation
{sort|[_<_/2+7]}                 Anonymous function
 sort                            Sorts the numbers in the input stream
     |[       ]                  And push
       _<                        whether the smaller value  is less than
         _/2+7                   the greater value / 2 + 7

Ruby, 21 bytes
->*x{x.max/2+7>x.min}

Yup.
f = ->*x{x.max/2+7>x.min}
f[18,21]  #=> false
f[80,32]  #=> true

Python 3, 115 bytes
Edit : Bugfix according to @Alexx Roche
a=int(input())
b=int(input())
c=a
d=b
if b < a:
 c=b
 d=a
if not c < d/2.0+7:
 print("Not ",end='')
print("Creepy")

Try it online!

This answer is far from golfed. For example, you can right your if statements all on one line, remove excess whitespace in all your comparisons, take the input as simply a,b=eval(input()). Furthermore there are many changes in the algorithm you're using that could make it shorter.

z-shell (zsh), 38 bytes
n=(${(no)@});echo $((n[2]/2+7-n[1]>0))

${(no)@} is a numeric sort of the argument array

Perl 5, 34 + 2 (-ap) = 36 bytes
$_=$F[0]/2+7>$F[1]|$F[1]/2+7>$F[0]

Try it online!

BASH, 135 bytes
I dabbled in this area a few years ago. I think that Greg Martin's point should factor in, and wonder how he picked 13 and not, (for example) 12 as 13 is the upper bound of x < x/2+7. Leo what is the test cases for [14,21], [15,15] and [16,21]?
#!/bin/bash
[ $1 -lt $2 ]&&./$0 $2 $1&&exit
[ $(($1+$2)) -ge $(((($1-$2)/2)**2)) ]&&[ $((((($2*10)+5)/19)+7)) -lt $2 ]&&echo -n 'Not ';echo Creepy

(could save bytes by using ✗ for "Creepy" and ✓ for "Not Creepy" or exit codes)

ARBLE, 25 bytes
lt(min(a,b),max(a,b)/2+7)

Try it online!

><>, 14 Bytes
:{:{(?r2,7+)n;

Pretty simple, but I don't see any obvious ways to cut down on characters.
Explanation:
               | Assume input is on the stack
:{:{           | Duplicate items on the stack (we pop them for inequality testing)
    (?r        | Sort them, so that the larger is on top of the stack
       2,7+    | Divide top item by 2 and add 7
           )n; | Print the truthy value of younger > (older/2) + 7

Prints 1 for non-creepy relationships, 0 for creepy ones

Add++, 8 bytes
L,#2/7+>

Try it online!
2 bytes off Jelly just feels weird
How it works
L,   - Lambda function
     - Example arguments: [15 50]
  #  - Sort;      STACK = [15 50]
  2/ - Halve;     STACK = [15 25]
  7+ - Add 7;     STACK = [15 32]
  >  - Greater;   STACK = [1]

I see no output when I run it.

@TheEmptyStringPhotographer That's because it's an anonymous function. You need to actually call it to get output, which you can do with the -i flag: Try it online!

Befunge, 28 bytes
&:&:00p`00g\> #0 #\_\7-2*`.@

Try It Online
Since Befunge uses integer math, I flipped it and added 7 to the minimum then multiplied by 2. 1 = Creepy, 0 = Not creepy

Pyt, 7 bytes
Đ↔₂7+≥Π

Try it online!
Takes input as an array of integers
Explanation:
       Implicit input [x,y]
Đ      Duplicate the array  [x,y],[x,y]
↔      Flip the top array   [x,y],[y,x]
₂      Divide the top of the stack by 2    [x,y],[y/2,x/2]
7+     Add 7 to each element of the top of the stack    [x,y],[y/2+7,x/2+7]
≥      Is the second on the stack greater than or equal to the top elementwise [x>=y/2+7,y>=x/2+7]
Π      Take the product (auto-casts to integers)
       Implicit print

Stax, 6 bytes
Æ╠àá;╚

Run and debug online
Here's the ungolfed ascii representation of the same program.
oE  sort inputs and push each to stack, now the larger age is on top of the stack
^h  increment larger age and integer divide by 2
7+  add 7
<   is the first number less than the second?

Run this one

Japt, 10 bytes
n v <U/2+7

Try it online!
Takes a 2-element array as input.
How it works
Un v <U/2+7

Un  Sort the input
v   Pop the first element (smaller one)
<   less than...
U/2+7  Implicitly cast the remaining 1-length array to number (larger one)
       then calculate /2+7

Vyxal, 8 bytes
sh½7+⁰t≥

Try it Online!
Inputs are a 2 element list.

Husk, 8 bytes
F·>o+7½O

Takes input as a 2-element list
F·>o+7½O
       O  sort
F         fold / apply following binary function to the elements
 · o+7½   apply this to the second argument
      ½   halve
   o+7    then add 7
  >       compare

Try it online!

Arturo, 20 bytes
$=>[>7+0.5*do sort&]

Try it!
$=>[       ; a function where input is assigned to &
    sort&  ; sort input
    do     ; dump both ages from input list onto the stack
    0.5*   ; multiply TOS (the higher age) by 0.5
    +7     ; add 7 to TOS
    >      ; is NOS greater than TOS?
]          ; end function

PowerShell, 60 bytes
$c={param($a,$b)[math]::max($a,$b)/2+7-gt[math]::min($a,$b)}

Try it online!
No doubt could be improved upon!

PowerShell, 42 bytes
    $c={param($a,$b)$a/2+7-gt$b-or$b/2+7-gt$a}

Rather than using [math]::min and ::max, I'm trying both $a vs $b and $b vs $a then -or the result.

Excel VBA, 28 Bytes
Anonymous immediate window function that tTakes age inputs from cells [A1] and [B1] as expected type Integer and outputs a Boolean value representing creepyness to the VBE immediate window
?[B1]/2+7>[A1]|[A1]/2+7>[B1]

Can't you just write this as a formula in a cell?

@Neil, yes I could have, though my particular purpose in golfing with VBA is more to keep some level of practice up with the language, rather than optimizing for the byte count

Ah yes, VBA is a slightly different language.

shortC, 21 bytes
D(a,b)a/2+7<b|b/2+7<a

QBIC, 30 bytes
~:>:|c=a┘d=b\c=b┘d=a]?d>=c/2+7

Explanation
           First, we mustsort the input parameters
~:>:       IF a (from cmd line) > b (from cmd line)
|c=a┘d=b   THEN set c and d
\c=b┘d=a   ELSE set c and d in the other way
]          END IF
?d>=c/2+7  PRINT -1 if d is higher than c's lower bound, 0 for creepy

Pyth, 17 16 13 12 bytes
>+7/.)JSQ2hJ

Takes a list. Outputs True for creepy, False for not creepy.
Try it!
explanation
>+7/.)JSQ2hJ
      JSQ        # Sort the input list (Q) and store the result in J
    .)           # pop the last/largest element from J (lets call it x)
          hJ     # the first/only element of J (lets call it y)
>+7/     2       # 7 + x/2 > y

old approach, 13 bytes
s.b<Y+7/N2_QQ

Takes a list. Outputs 1 for creepy, 0 for not-creepy.
Try it!
explanation
s.b<Y+7/N2_QQ
 .b       _QQ        # map over the list and it's reversal (variables: Y,N)
   <Y+7/N2           # Y < N/2 + 7
s                    # sum: False + False = 0; True + False = 1 (; True + True = 2 can never occur, because one of the ages is always larger or equal)

CJam, 10 bytes
q~$~2d/7+<

Takes input as a list.
Try it online!
Explanation
q~          e# Read and eval input.
  $         e# Sort the list.
   ~        e# Dump the list on the stack.
    2d/7+   e# Apply age/2+7 to the greater age.
         <  e# Check if the other age is less than that.

Do you need the d? all the test cases work without it.

@Challenger5 OP said not to round if the age is an odd number, so I assume so.

Actually, 12 bytes
;RZ⌠i½7+≤⌡Mπ

Try it online, or run all test cases!
Outputs 1 if it's not creepy, and 0 if it is.
Explanation:
;RZ⌠i½7+≤⌡Mπ  implicit input: [a, b]
;RZ           zip input with its reverse ([[a,b], [b,a]])
   ⌠i½7+≤⌡M   for each pair:
    i           flatten
     ½7+        half of one plus 7
        ≤       is less than or equal to the other?
           π  product (acts as a boolean AND)

q/kdb+, 17 16 bytes
Solution:
{(x&y)<7+.5*x|y}

Try it online! (oK rather than q/kdb+)
Examples:
q){(x&y)<7+.5*x|y}[22;18]
0b
q){(x&y)<7+.5*x|y}[22;17]
1b

Explanation:
Outputs creepy as boolean 1b (true, creepy) or 0b (false, not creepy)
{(x&y)<7+.5*x|y} / solution
{              } / lambda function with implicit parameters x and y
            x|y  / max of x and y
         .5*     / multiply by 0.5 (aka divide by 2)
       7+        / add 7
      <          / less than?
 (x&y)           / min of x and y

Notes:
Polyglot in:

q/kdb+
K
oK (see TIO link)

Alice, 21 18 bytes
/o
\i@/sh2:-6-.H+n

Try it online!
-3 bytes thanks to Martin Ender.
Input is in any format that includes exactly two integers.  Output is 1 if creepy and 0 if not creepy.
Explanation
ish2:-6-.H+no

i                Input numbers
 s               Sort the two ages
  h2:            Divide larger age by 2 rounded up
     -           Subtract from smaller age
      6-         Subtract 6
        .H+      Determine whether result is negative
           n     Push 1 if was negative, 0 otherwise
            o    Output

Would it be possible to shorten the formula by sorting the inputs with s (which puts the max on top and the min below)?

S.I.L.O.S, 64 bytes
readIO
j=i
readIO
x=i/2+7-j
y=j/2+7-i
if x c
if y c
print k
lblc

Try it online!
It prints out the letter "k" if the relationship is ok, otherwise it prints out nothing. I couldn't figure out any mathemagical way with standard mathematical operators to do an if x>0 pr y>0 to save bytes.

Alternatively, we can create an "or gate" by exploiting the fact that x^.5 will error out if the number is negative.This removes the need for a conditional, but lengthens our code. This version outputs 0 for creepy and some positive number for not creepy.
S.I.L.O.S, 67 bytes
readIO
j=i
readIO
x=0-i/2-7+j
y=0-j/2-7+i
a=x^.5+y^.5+1
printInt a

Try it online!

tcl, 59
scan $argv %d\ %d x y
puts [expr max($x,$y)/2+7>min($x,$y)]

demo
To try, type
tclsh main.tcl Age1 Age2
on the green area.

Tcl, 44
I was losing to answers implementing it as a function, so I had to make mine into a function also:
proc c x\ y {expr max($x,$y)/2+7>min($x,$y)}

demo — You just have to press on the "Execute" button and see the 0 and 1 digits on the green area matching the question's creepiness values.

Wolfram Language, 16 bytes
Min@#<Max@#/2+7&

Takes input as a list.

MATL, 10 bytes
tEP-X>-14>

My first ever solution. :) Try it online!
Explainer:
t    % push the input array [a b] (possibly redundant)
EP   % push the flipped(P)+doubled(E) array [2b 2a]
-    % subtract to get [a-2b b-2a]
X>   % take the maximum
-14> % if either exceeds -14, then it is creepy af bro!

Ly, 8 bytes
a2/7+Lfp

Try it online!
Explanation:
a2/7+Lfp

a        # sort (implicit input)
 2/7+    # halve and add 7
     L   # less than?
      fp # pop value, leaving just the result
         # implicit output

C, C++, Java, C#, D, 56 bytes
-1 byte thanks to Zacharý
int c(int a,int b){return((a>b?a:b)/2+7)>(a>b?b:a)?1:0;}

C, C++, D optimization : 52 bytes
int c(int a,int b){return((a>b?a:b)/2+7)>(a>b?b:a);}

C++ convert bool object to int implicitly ( false = 0, true = 1 )
In C, booleans are represented by integers values, where 0 is false, and 1 is true.
I barely know how to print something in D, so i won't comment about boolean to int conversions in this language Zacharý just informed me that D bool to int conversion works exactly like in C/C++
Unfortunately, Java and C# can't convert an integer to a boolean, so we need to use ternary operator.

Dyalog APL, 11 bytes
⌊<(⌊7+.5×⌈)

Try it online!

Sakura, 7 bytes
>Ƣ+ħ⓪7ƣ

Takes input as an array and outputs -1 if creepy and 0 otherwise.
Explanation:
>                     >
 Ƣ      max(         )
  +                +
   ħ             /2
    ⓪       input
     7              7
      ƣ                min(     )
                           input

x86-64 machine code, 16 bytes
Takes the ages in edi, esi, returns 0 or 1 in eax, following x86-64 SysV ABI for bool creepy(int, int);.
39 f7 7d 02 87 fe 8d 44  36 f2 29 f8 c1 e8 1f c3

Assembly source follows.  We test 2*young - 14 - old < 0.
creepy:
        cmp     edi, esi
        jge     ready
        xchg    edi, esi
ready:
        ;;  higher age now in edi
        lea     eax, [rsi*2-14]
        ;; eax = highest age the younger person can date
        sub     eax, edi
        ;; if result is negative, then creepy
        shr     eax, 31
        ret

ARM64 machine code, 24 bytes
Takes the ages in w0, w1, returns 0 or 1 in w0, following normal ARM64 calling conventions for bool creepy(int, int);.  (You could handle 64-bit ages by replacing all w with x registers, with no increase in size.)
4b010402
4b000423
3100385f
3a4ed860
1a9fd7e0
d65f03c0

Assembly source follows.  We test x-2*y > -14 || y-2*x > -14.
creepy:
    sub     w2, w0, w1, lsl #1
    sub     w3, w1, w0, lsl #1
    cmn     w2, #14
    ccmn    w3, #14, #0, le     // #0 = none of NZCV, makes gt true
    cset    w0, gt
    ret

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
What's the Date?
Challenge
Weirdly, this hasn't been done yet: output the current date.
Rules
The date format you should follow is as follows:
YYYY-MM-DD

Where the month and day should be padded by zeroes if they are less than 10.
For example, if the program is run on the 24th May 2017, it should output
2017-05-24

The date can either be always in UTC or in the local date.
You must handle leaps years. i.e. in leap years, February has 29 days but 28 days in a normal year.
Winning
Shortest code in bytes wins.

... and in normal years February has 31 days of course

@edc65 I should really have known that Feb is 29 days long on leap years :P

Finally a golf where golfing languages cant perform

RIP Python needing the word datetime twice

In TIO, if I use p in Ruby it surrounds the output in quotes, but the actual date is in the right format. Is this okay?

@snail_ Do you have a link to this?

@BetaDecay here: https://tio.run/nexus/ruby#@1@gEJKZm6qXl1@uV1xSlFYC5Kiruqn//w8A

@snail_ That's fine

A codegolf challenge where practical languages can beat golfing languages? Amazing!

Bash with GNU coreutils, 16 7 bytes
-8 bytes thanks to Neil (and fergusq) (no pipe required to output)
-1 byte thanks to 12431234123412341234123 (use the built-in option with flag -I!)
date -I

Try it online!

Why the echo $(...)?

Does it not need it to output?

date outputs already, the output is piped to stdout. You don't need to pipe it to echo, which pipes it to stdout. Try it online!

But even if you really want to use echo, then at least echo \date +%F``.

@manatwork Thanks, I am totally new to bash, it really is alien to me.

why not use -I ?

@12431234123412341234123 Indeed -I will work (note to self: rtfm). There is also an entry on the question I linked to with that! Thanks.

According to POSIX 2018, date does not support the option -I. So instead of "Bash", this answer should rather be titled "Any environment with GNU coreutils installed in the default path".

PHP, 17 bytes
<?=date('Y-m-d');

Actually, YYYY-MM-DDThh:mm:ss+hh:mm is also an ISO 8601 formatted date and these 11 bytes: <?=date(c); print the whole stuff. ;)

<?=strstr(date(c),T,1); to give the c format a little chance

Bash, 15 bytes
printf '%(%F)T'

Sample run:
bash-4.4$ printf '%(%F)T'
2017-05-24

Try it online!

Even better than I found on SO, was unaware of T.

@JonathanAllan, it was added only in Bash 4.2 and until Bash 4.3 it required an argument to format.

Japt, 6 bytes
Ks3 ¯A

Try it online!
Explanation:
Ks3 ¯A
K       // New Date()
 s3     // .toISOString()
    ¯A  // .slice(0,10)

JavaScript (ES6), 34 bytes
_=>new Date().toJSON().split`T`[0]

f=

_=>new Date().toJSON().split`T`[0]

console.log(f());

Hmm, same length as _=>new Date().toJSON().slice(0,10)

SQLite, 13 characters
select date()

Good boy, SQLite. Other SQL dialects usually need either current_date or date(now()).
Sample run:
bash-4.4$ sqlite3 <<< 'select date()'
2017-05-24

MySQL has curdate

Mathematica, 20 bytes
DateString@"ISODate"

Sometimes I come into these challenges not to see if Mathematica has a built-in, but to see what it is

Perl 6,  14  12 bytes
Date.today.say

Try it
now.Date.say

Try it

Excel, 24 bytes
=TEXT(NOW(),"yyy-mm-dd")

Excel will still do a 4-digit year with only 3 y's.

Google sheets will add the "). Excel won't. It will add the ) on the end but only after prompting you so it would require additional user input and drive the score up again. 24 bytes is probably the shortest Excel answer unless we allow for regional settings using the ISO date format by default and that's up for debate.

@EngineerToast Thanks. I'll fix that.

R, 10 bytes
Sys.Date()

Try it online!

Since sys.date already is a function, you don't have to add the (), so this is only 8 bytes :)

@JarkoDubbeldam not true, the () is necessary

@D.Nelson https://codegolf.meta.stackexchange.com/questions/2419/default-for-code-golf-program-function-or-snippet Sys.Date is a function, so would suffice as solution. No need to explicitly call it.

@JarkoDubbeldam that's normally the case but I think that since the challenge is to 'output the current date in ISO-8601 format' I actually need to output it.

Well yeah, and the last line of Sys.Date does the outputting for you. It is similar to when you have a solution that starts with function(x), you don't end that with an explicit call either. It's just how built-ins are scored.

jq, 19 characters
(15 characters code + 4 characters command line options)
now|todate[:10]

Sample run:
bash-4.4$ jq -nr 'now|todate[:10]'
2017-05-24

Try in jq‣play

Lua, 18 characters
print(os.date"%F")

Sample run:
bash-4.4$ lua -e 'print(os.date"%F")'
2017-05-24

Try it online!

Alice, 9 bytes
/oT\
@%;'

Try it online!
Explanation
I'll leave the exact control flow as an exercise to the reader, but the linearised code that is being run in Ordinal mode is:
%T'T%;o@

And here is what it does:
%   Split an implicit empty string around an implicit empty string. Really doesn't
    do anything at all.
T   Push the current datetime as a string like "2017-05-24T20:53:08.150+00:00"
'T  Push "T".
%   Split the datetime string around the "T", to separate the date from the time.
;   Discard the time.
o   Output the date.
@   Terminate the program.

One way this might be golfable is to reuse the % to terminate the program in Cardinal mode with a division by zero, but the only layout I've come up with is the following:
\;T
\%o'

But here, the % doesn't actually terminate the program, because we push 111 ('o) right beforehand so there's never a division by zero.
In principle it might also be possible to reuse % to get rid of the ;, since trying to split the date around the time will simply discard the time.

VBA, 5 25 bytes
?Date unpredictable, dependent on system short date settings
?Format(Now,"yyyy-mm-dd")

Output:
2017-05-25

This answer is exceedingly volatile and by deafult, will not work on most computers as it depends entirely upon the user having their system short date format [under settings -> Date & Time in Win10] set to 'YYYY-MM-DD. The default format for this is M/D/YYYYand thus this for the output of theDatefunction is5/25/2017. To correct this your answer would need to be wrapped in a Format` call.

@TaylorScott to that end ?format(now,"yyyy-mm-dd") using now is shorter than date

@Greedo, that is correct. This is, to my knowledge, the shortest way to achieve this goal using VBA

@TaylorScott thanks for pointing this out, I wasn't aware of the dependence on the system date settings. This date format is the default on my PC and in my country in general, so I was a little overconfident here.

Java 8, 26 32 bytes
()->java.time.LocalDate.now()+""

Fixed format thanks to Kevin Cruijssen

Wow, Java is actually short... I'd never have thought I'd see the day :D

@BetaDecay It is short, but currently not complying to standard codegolf rules. It should be a function instead of a snippet, and the required imports should be counted as well. So it should be ()->java.time.LocalDate.now().toString() instead. Then again, you can golf .toString() to +"", so it becomes ()->java.time.LocalDate.now()+"" in total (32 bytes).

SmileBASIC 3, 29 bytes
SB has a date string built in... but it's in the wrong format! It uses slashes instead of dashes, no good. Plus, being the self-respecting BASIC it is, there is no global replace function. I guess I have to do it myself...
D$=DATE$D$[4]="-
D$[7]="-
?D$

Prolog (SWI), 46 bytes
f(X):-get_time(Y),format_time(atom(X),'%F',Y).

Try it online!

Welcome to PPCG!

x86-16 machine code, IBM PC DOS, 55 53 48 bytes
Binary:
00000000: b42a cd21 91b3 64f6 f38b c8e8 1400 8ac5  .*.!..d.........
00000010: e80f 00b0 2dcd 298a c6e8 0600 b02d cd29  ....-.)......-.)
00000020: 8ac2 d40a 0530 3050 86c4 cd29 58cd 29c3  .....00P...)X.).

Listing:
B4 2A       MOV  AH, 2AH        ; get system date: CX=year, DH=month, DL=day
CD 21       INT  21H            ; call DOS API
91          XCHG AX, CX         ; move year in CX to AX (dividend)
B3 64       MOV  BL, 100        ; divide by 100 to separate digits of year
F6 F3       DIV  BL             ; AL = first two digits, AH = last two digits
8B C8       MOV  CX, AX         ; save AX to CX to display last two digits later
E8 0122     CALL DISP_WORD      ; display decimal value in AL
8A C5       MOV  AL, CH         ; move last two digits to AL
E8 0122     CALL DISP_WORD      ; display decimal value in AL
B0 2D       MOV  AL, '-'        ; date separator
CD 29       INT  29H            ; fast write AL to screen
8A C6       MOV  AL, DH         ; move month in DH into AL for display
E8 0122     CALL DISP_WORD      ; display decimal value in AL
B0 2D       MOV  AL, '-'        ; date separator
CD 29       INT  29H            ; fast write AL to screen
8A C2       MOV  AL, DL         ; move day into AL and display
        DISP_WORD:
D4 0A       AAM                 ; convert binary to BCD
05 3030     ADD  AX, '00'       ; convert BCD to ASCII char
50          PUSH AX             ; save second digit for display later
86 C4       XCHG AL, AH         ; convert endian, AL = first digit, AH = second digit
CD 29       INT  29H            ; fast write AL to screen
58          POP  AX             ; restore digits
CD 29       INT  29H            ; fast write AL to screen
C3          RET                 ; return to caller/DOS

Output
Standalone DOS program, run from the command line outputs current date to the screen.

Much of this program is converting binary values to ASCII for console output. This uses (abuses) the binary-to-BCD instruction (AAM) to create a printable ASCII version of the output.

Pyth, 19 bytes
++++.d3"-".d4"-".d5
In Pyth . allows you to access a number of extra syntactic goodies. d contains various date options which are accessed with .d#, where # is a number 0-9. 3 is for the current year, 4 is the current month, and 5 is for the current day.
Format for the challenge wants dashes between each element of the date so we append them. Pyth using Polish notation for all math operands, thus the ++++.

Consider adding a short explanation of your code for those who don't know Pyth. Short code-only answers (like this one) tend to be automatically flagged as low quality.

Thanks I'll do that!

Factor, 21 bytes
[ now timestamp>ymd ]

Try it online!

TI-Basic, 72 bytes
getDate→A
toString(Ans(1→B
toString(ʟA(2→C
toString(ʟA(3→D
If C<10
"0"+C→C
If D<10
"0"+D→D
B+"-"+C+"-"+D

This only works on a TI-84+ CE OS 5.2 and if the user has already set the time and date correctly.

CJam, 22 15 bytes
et3<{sY0e[}%'-*

Try it online!
-7 bytes thanks to Challenger5.
Explanation:
et                       Get array with [year,month,day,stuff...]
  3<                     Slice array to get [y,m,d]
    {                    For each item do:
     s                     To string
      Y0e[                 add a 0 to the beginning of the string if it is shorter than 2 chars.
          }%             End for each
            '-*          Join the array with "-" as a separator

You can use e[ (pad array) for 15 bytes: et3<{sY0e[}%'-*

@Challenger5 that's cool. Thanks

Crystal, 30 bytes  24 bytes  21 bytes
-6 thanks to Nick Clifford
-3 from looking at snail_'s answer in Ruby
p Time.now.to_s("%F")

Try it online!

I'm pretty sure you can use %F. Also, nice to see Crystal on PPCG!

@Nick Clifford I saw it on tio and thought it had a cool name.

QBIC, 33 bytes
B=_D?_sB,-4|+@-`+_sB,2|+A+_sB,4,2

Explanation:
B=_D        Assign the system's date to B$
            This is in American mm-dd-yyyy format, so we'll need to do some reformatting
?_sB,-4|    PRINT substring B, take 4 chars from the right
 +@-`         plus the string literal "-", now A$
 +_sB,2|      plus the leftmost two chars
 +A           and A$ again
 +_sB,4,2     plus the middle part.

Python 2,  53  40 bytes
-10 bytes thanks to Gábor Fekete (ISO-8601 is the default format for a date object)
from datetime import*
print date.today()

Try it online!
How?
datetime.date.today() will return a datetime.date object containing the local date information.
print will print a string representation of that object, this will call the object's __str__ function.
From the docs:

date.__str__(): For a date d, str(d) is equivalent to d.isoformat().
date.isoformat(): Return a string representing the date in ISO 8601 format, ‘YYYY-MM-DD’. For example, date(2002, 12, 4).isoformat() == '2002-12-04'.

import datetime;print datetime.date.today() this is only 43 bytes and uses datetime. Why is the even shorter version deleted?

@GáborFekete Thanks (I think you should really have posted, it's sufficiently different). The other answer was probably deleted because it did not print the correctly formatted string. I have added an explanation about why this does actually work (so long as one includes the print). Saved another three doing (the evil) import*.

I wanted to but there was an another solution which was even shorter than mine but was deleted for some reason.

...which has now been edited to include the print while deleted then undeleted.

Go, 62 56 bytes
import."time"
func f()string{return Now().String()[:10]}

Try it online!

q/kdb+, 18 16 bytes
Solution:
ssr[.z.d$:].".-"

Example:
q)ssr[.z.d$:].".-"
"2018-01-01"

Explanation:
Take the string representation of today's date, and replace the dots with dashes.
ssr[string .z.d;".";"-"] / fully ungolfed solution
ssr[string .z.d;;].".-"  / partially ungolfed solution
           .z.d          / current UTC date (2018.01.01)
    string               / convert to string ("2018.01.01")
ssr[           ;;]       / string-search-replace
                  .".-"  / the two parameters

Python 2, 40 bytes
from datetime import*;print date.today()

Powershell, 26 17 bytes
Date -f yyy-MM-dd

Thanks to @ConnorLSW for the 9 bytes.

you can save a lot here. date -f 'yyyy-MM-dd'

Thanks Man. I am new to Powershell. So,  I tried my luck here

@Shivaprasath V - no worries, check this thread for a couple of helpful posts with the more basic PS golfing tricks if you want.

Oracle SQL, 46 bytes
SELECT TO_CHAR(SYSDATE,'YYYY-MM-DD') FROM DUAL

05AB1E, 16 13 bytes
Saved 3 bytes thanks to Kevin Cruijssen
žgžfže)T‰J'-ý

Try it online!
Explanation
žgžfže)         # push [year, month, day]
       T‰       # divmod each by 10
         J      # join each div and mod result together
          '-ý   # join year-month-day on "-"

It's a shame that žgžfže‚т+€¦\'-ý` doesn't work.

13 bytes

@KevinCruijssen: The divmod trick being useful again. I'm definitely going to have to remember that ;)

C#, 46 45 bytes
_=>System.DateTime.Now.ToString("yyy-MM-dd");

Saved a byte thanks to @raznagul.

Where do I download Sytem?

@EriktheOutgolfer It's a custom wrapper I created around the System namespace because I kept doing the same typo...

You know stuff you create locally isn't allowed on PPCG unless it's published before the question is asked. :P

@EriktheOutgolfer Damn, next time I'll create a shorter wrapper as well...

As leading zeroes for the year are not required the format string "yyy-MM-dd" will also work.

Ruby, 23 bytes
Prints the local time.
p Time.now.strftime'%F'

p Time.now.to_s[0..9]

MATLAB/Octave, 25 15 bytes
datestr(now,29)

Try it online!

The built-in function now returns the current system date in a weirdy MATLAB serial format.
datestr formats the weirdy serial format into a string of a requested format - which is in this case 'YYYY-mm-dd'. It turns out that MATLAB has a list of predefined formats for datestr. ISO8601 is one of them and is represented by the number 29, which allows a saving of 10 bytes.

Rust, 84 Bytes
extern crate chrono;fn main(){print!("{}",chrono::Local::now().format("%Y-%m-%d"));}

Noether, 8 bytes
6D0 10SP

Try it here!
Explanation:
6  - Push the number 6 onto the stack
D  - Pop the mode number off the top of the stack and push the ISO date string (Mode 6)
0  - Push the number 0 onto the stack
10 - Push the number 10 onto the stack
S  - Pop the three items, A, B and C off the top of the stack and slice the string, A, from B to C
P  - Print the item on the top of the stack

Alternatively, you could use the following method (also for 8 bytes):
6D"T"^#P

Try it here!
Explanation:
6   - Push 6 onto the stack
D   - Pop the mode number off the top of the stack and push the ISO date string (Mode 6)
"T" - Push the string "T" onto the stack
^   - Pop two strings A and B off the stack and split A by B
#   - Pop the top item off the stack
P   - Print the item on the top of the stack

C++14, 143 bytes 139 bytes
#include <cstdio>
#include <time.h>
int main (){time_t t;char D[11];time(&t);strftime(D,sizeof D,"%Y-%m-%d",localtime(&t));printf("%s",D);}

Timtech pointed out to me that i don't need all spaces
Test me!

Can't you remove a few of those spaces?

Swift,  13 bytes
print(Date())

J, 16 bytes
6!:0'YYYY-MM-DD'

Try it online!

vim, 18
i®=strftime("%F")↵

where ® and ↵ are Ctrl-R and Enter.

Zsh, 15 bytes
Who needs date?
print -P %D{%F}

Try it online!
If we assume the program will only be run in current century, we can save 2 bytes:
print -P 20%D

"If we assume the program will only be run in current century" — This is precisely how Y2K happened…

Perl 6, 12 bytes
say now.Date

Try it online!

Vyxal, 2 bytes
kD

Try it Online!
Uh, it's a built in constant using python's date.today().isoformat().

Jelly, 45 bytes
“from datetime import*;print(date.today())”ŒV

Try it online!
evaluates python code because comedy

You could at least compress it

I am sorry, comedy is more important

+1 for comedy 10/10

Python 2, 59 bytes
Oddly enough, I can't find an easier built-in... somebody else found it. ><
from datetime import*
print datetime.now().isoformat()[:10]

Try it online!

Fourier, 33 bytes
|~D<10{1}{0o}Do|F5do`-`4d^F`-`3dF

Try it online!
Uses a function which adds the leading zero... So long :P

C, 104 79 61 bytes
Saved 18 bytes thanks to hvd.
n,b[99];f(){time(&n);strftime(b,99,"%F",gmtime(&n));puts(b);}

"strftime segfaults if you don't #include <time.h>." -- Not on all implementations. You could get rid of that line and save some bytes by simply choosing an implementation where it works. (Most x86-32 Linux distros probably work.)

SAS, 31 bytes
%put %sysfunc(date(),yymmdd10.);

Use e8601da. to save one byte.

MATL, 6 bytes
Z'29XO

Try it online!
Explanation
Z'    % Push current date and time as a float
29    % Push 29
XO    % String representation of date and time with specified format.
      % Format 29 corresponds to 'yyyy-mm-dd'. Implicitly display

C#, 51 bytes
Console.Write(DateTime.Now.ToString("yyyy-MM-dd"));

You can save 7 bytes by using string interpolation -
Console.Write($"{DateTime.Now:yyyy-MM-dd}");

This is just a code snippet, you need to wrap it in a function/program. You also need to fully qualify the classes or add the appropriate usings.

Or look at @TheLethalCoder example on making a function that returns it rather than writing to standard output, most questions allow this.

@Chris Thanks!  I didn't know that.

Pyth, 20 bytes
j\-+.d3m.[\02`.d+4d2

Try it here.

VBA, 26 Bytes
Anonymous VBE Immediate window function that outputs the current date in the specified format, regardless of system settings, to the VBE immediate window
?Format(Now,"YYYY-MM-DD")

Objective-C, 27 bytes
NSLog(@"%@",[NSDate date]);

Even shorter: NSLog(@"%@",[NSDate new]);

Windows batch, 166 144 136 107 bytes
@set X=
@for /f "skip=1" %%x in ('wmic os get localdatetime')do @set X=%%x
@echo %X:~0,4%-%X:~4,2%-%X:~6,2%

Outputs local time

PowerShell, 16 bytes
date -u %Y-%m-%d

Try it online!

APL (Dyalog), 17 bytes
'-'@5 8⍕1E3⊥3↑⎕TS

Try it online!
⎕TS Y M D h m s ms
3↑ take the first three
1E3⊥ evaluate in base-1000
⍕ make into string
'-'@5 8 substitute a dash at positions five and eight

Haskell, 55 bytes
import Data.Time
m=getCurrentTime>>=putStr.take 10.show

Not exactly the shortest answer (even the Java answer is shorter!)
Explanation
import Data.Time                            --put the function getCurrentTime into scope
m=getCurrentTime>>=putStr.take 10.show
m=                                          --define a variable/function m
  getCurrentTime                            --get the current time wrapped in the IO type
                >>=                         --feed the current time into the following function
                                  show      --display the time as a string
                          take 10.          --take the first ten characters of that to get the date
                   putStr.                  --print it

Python, 39 bytes
Beats this answer by 1 byte.
from datetime import*;str(date.today())

This won't actually work when put in a file and executed, but it does work when you paste this in a python shell. However, it works if you have this in a file and then call that file's __main__ function, so I don't know if this is allowed by the rules. I'm going to assume that it is.

Common Lisp, 86 chars
(multiple-value-bind(a b c d e f)(get-decoded-time)(format t"~4a-~2,'0d-~2,'0d"f e d))

Good old verbose Common Lisp!
Try it online!

Funky, 18 bytes
@os.date"%Y-%m-%d"

Try it online!

AWK, 17 bytes
$0=strftime("%F")

Try it online!

jamal, 32 characters
{@format date=YEAR-0M-0D}{@date}

(Only interesting part is jamal's unusual date format specifiers. For example YYYY would mean YY twice, where YY is the year as in Perl, since 1900.)
Sample run:
bash-4.4$ jamal.pl date.jam
2018-03-19

Gema, 40 characters
\A=@subst{*\\/*\\/*=\$3-\*-\*;@date}@end

Sample run:
bash-4.4$ gema '\A=@subst{*\\/*\\/*=\$3-\*-\*;@date}@end'
2018-03-19

Japt, 5 bytes
AîKs3

Try it
A         :10
 î        :Slice the following to that length
  K       :  Current date & time
   s3     :  Convert to ISO string

Forth (gforth), 52 bytes
: x 0 <# # # #> ." -"type ; : f time&date 1 .r x x ;

Try it online!
Code Explanation
\ x prints a dash followed by a 2-digit number with leading zeros
: x               \ start a new word definition
  0 <# # # #>     \ convert number to double-precision, then converts to a string with leading 0
  ." -"type       \ print "-" followed by the string from the previous command
;                 \ end the word definition

: f               \ start a new word definition
  time&date       \ forth built-in to get the components of a date/time (year on top)
  1 .r            \ print the year (with no space appended)
  x               \ print a dash, followed by the month
  x               \ print a dash, followed by the day
;                 \ end word definition

TI-Basic (TI-84), 32 bytes
Output(1,1,sum(getDate{ᴇ6,ᴇ3,1
Output(1,5,"-
Output(1,8,"-

getDate is a list in the form {2021, 1, 20}.
the date list is multiplied by {1e6, 1e3, 1} and then summed, giving a single number in the form yyyy0mm0dd, this deals automatically with leading zeros
-s are then added at the right places, giving the output yyyy-mm-dd

Nim, 32 bytes
import times
echo ($now())[0..9]

Try it online!

Thunno 2 h, 3 bytes
kQO

Attempt This Online!
Explanation
kQ   # Push a string of the current time
     # in the format "YYYY-MM-DD HH:mm:ss"
  O  # Split it on spaces to get the list
     # ["YYYY-MM-DD", "HH:mm:ss"]
     # Implicit output of first item
     # ("YYYY-MM-DD")

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Klein Topololyglots
Klein is a 2D language I have designed that can be embedded on 12 different topological surfaces.  A Klein program can be run on different surfaces by changing the command line arguments.
The topology determines where the instruction pointer goes when it goes off the edge of the program.  When moving off of the edge the ip will jump to an edge with the matching color, and will maintain its position relative to the arrow, i.e. the pointer will conserve its distance from the arrow head.
For example topology 000, the topology used by most 2D languages, causes the instruction pointer to wrap around to the other side when if moves off an edge.
Task
The task is pretty simple, write a Klein program that when run will output the topology it is run in.  The individual numbers may be separated by spaces.  (e.g. 000 and 0 0 0 are both permissible output). You may choose to either use or ignore the -A command line flag it will not cost you bytes if you use it.
This is code-golf so the shortest answer will be the winner.
Here is a online test driver that can be used to test all of the topologies at once.  To run in integer mode remove the -A.

+1 for a great example of a good language-specific challenge. :)

Would the -A flag cost bytes? I'm assuming so.

@StephenS No.  I'll give it to you for free :)

The IP movements are hurting my head

Please fix the image ...

@JoKing I've known for a while, and have been meaning to fix it.  I removed the image for now and hopefully I'll take the time to make a new one eventually.  Thanks.

52 48 bytes
./@$0<$
21\./01
..>..!\
@
.<..<\
20//\11
@01$00@

Try it online!
Test Driver
Explanation
In Klein the IP starts in the top left corner going right. The first step I wanted my program to do was to send the IP off the top of the program to determine the first and third bit. The IP would reenter the program as follows depending on the topology:
             ^
            I|P
            ./.....
201, 211 -->.......<-- 100, 110
            .......
            .......
            .......
200, 210 -->.......<-- 101, 111
            .......
             ^   ^
             |   |
            000 001
            010 011

I decided that the my program would record the third bit of the topology before the second bit but swap them (using $) before the end. To that end I added code to push the first and third bits of each topology at the IP's points of entry described above.
./.....
21...01
.......
.......
.......
20...11
.0...0.

Next I focused on the topologies with 1 or 2 as their first bit. I decided to recombine them and send them off on the side not connected to the north side so I could determine their second bit.
                      ./.....
                      21\./01
                      ..>....--> 200, 201, 210, 211
                      .......
100, 101, 110, 111 <--....<..
                      20/.\11
                      .0...0.
                        ^ ^
                        | |
                        / \
                      110 100
                      111 101
                      210 200
                      211 201

Conveniently this regrouped the topologies by their second bit so I could push that to the stack.
./.....
21\./01
..>....
.......
....<..
20/.\11
.01.00.

After that I just needed to swap the second and third bit and have the program terminate.
./.$...
21\./01
..>....
@......
....<..
20//\11
.01$00.

Now that the topologies with 1 or 2 as their first bit worked, I could focus on making the topologies with 0 give the correct output. The first step was recombining them so that they could be separated into two groups based on their second bit.
                      ./.$...
                      21\./01
                      ..>....<-- 010, 011
                      @......
000, 001, 010, 011 <--.<..<<.<-- 000, 001
                      20//\11
                      .01$00.

I first focused on those topologies with 1 as their second bit. These presented a challenge because for them the IP was on a line already used by the topologies with 2 as their first bit. Since it would be tricky to fit more than one instruction on that line (a single instruction can be jumped using the ! instruction) and I was running low on space as a whole, I decided to redirect the IP off that line and reuse an existing 1 instruction to push the second bit.
./.$...
21\./01
..>..!\
@......
.<..<<.
20//\11
.01$00.

Now all that was left to do for the topologies with 1 as their second bit was to fix the order of the second and third bit and terminate.
       ^
       |
 ./.$..$
 21\./01
 ..>..!\
 @......
 .<..<<.
 20//\11
 @01$00@
 ^     ^
 |     |
011   010

Lastly remained the topologies with 0 as their second bit. There was not much space left in the program with the largest unused space being on the top line so it was there that  I redirected the IP for the topologies with 0 as their second bit.
./.$.<$
21\./01
..>..!\
@......
.<..<\.
20//\11
@01$00@

I still needed to push 0 for the second bit and fix the order of the second and third bit as well as terminate the program. Fortunately, I was able to reuse an existing $ instruction so the 0 and @ instructions could fit in the remaining spaces.
./@$0<$
21\./01
..>..!\
@......
.<..<\.
20//\11
@01$00@

Finally the nops can be stripped from the ends of lines to get the final program.

116 88 86 77 69 61 60 59 58 54 53 50 bytes
\2..@2
/1\<$00
/>!..>!
0//
@0$10@1
011\.<0
\.<@>1@

Try it online!

@WheatWizard how did you make it then 0.o and maybe you should think about creating a visual kind of like ETH made for Cubix

@StephenS If you run Klein with the -d flag it will do exactly that.  Unfortunately it doesn't work in TIO.

44 41 40 38 37 bytes
\\1.>2
/0./
@./$(\
$>0!>
11$/10
$.@.1

Try it online!
Test driver.
Uses a 6 by 6 square. The shortest I could get with an 8 by 8 square is 38 bytes if anyone wants to try improving it.
Explanation:
One the first pass-through the code encodes the first two numbers for the prefixes 0 and 1. For 2, it encodes the third number then the first.
     201  200
     211  210
       |  |
       v  v
   -> \\1.>2
 IP<- /../..  <- 000, 001
      ...$..
      .>0...
      .1..10  <- 010, 011
      ....1.
       ^  ^
       |  |
     100  110
     101  111

Then we pass the IPs through the third edge to decide the final number. We combine the IPs with the same prefix.
     201  200
     211  210
       |  |
       v  v
   -> \\1.>2  -> 0,2 or 1,2
 IP<- /../..  <- 000, 001
      ...$..
      .>0!>.  -> 1
      .1./10  <- 010, 011
      ....1.
       ^ |^
       | v|
       | 0|
     100  110
     101  111

For the 0 and 1 prefixes, they both come out the top edge to decide the third number.
     201  200
     211  210
       |  |
       |10|
       vvvv
   -> \\1.>2  -> 2
 IP<- /0./..  <- 000, 001
      @./$..
      .>0!>.  -> 1
      .1./10  <- 010, 011
      ....1.
       ^ |^
       | v|
       | 0|
     100  110
     101  111

For the 2 prefix, the IPs come out the corners from the bottom edge.
     201  200
     211  210
       |  |
       |10|
       vvvv
   -> \\1.>2  -> 2
 IP<- /0./..  <- 000, 001
      @./$(\
      $>0!>.  -> 1
      11$/10  <- 010, 011
      $.@.1.
      ^^ |^^
      || v||
      1| 0|0
     100  110
     101  111

Both edges swap the first and third number, push the second number and swaps it with the third to get the correct order.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Find all Number Relations
Inspired by: Find an Unrelated Number

Challenge
Given two positive integers as input, output the mathematical operations that can be used on those inputs to generate every number from 1 to n inclusive where n is the smallest prime greater than the sum of the two inputs. If the number cannot be generated using the list of mathematical operations below, the output for that number should indicate that it is "unrelated".
For example, for the inputs 2 and 3, n=7 so one valid output would be
Subtraction, Modulus, Bitwise OR, Unrelated, Addition, Multiplication, Unrelated
(see Output section below for clarification on valid outputs)
(If Erik the Outgolfer's answer is valid, the last term will always be unrelated.)
Operations that must be considered are:
Addition        (a + b)
Subtraction     (a - b) and (b - a)
Multiplication  (a * b)
Division        (a / b) and (b / a)
Modulus         (a % b) and (b % a)
Bitwise OR      (a | b)
Bitwise XOR     (a ^ b)
Bitwise AND     (a & b)

In cases where an operation would lead to a non-integer (such as 2/3), always floor. So 2/3=0 and 3/2=1.
Exponentiation is not included because it is never required. a**b and b**a will always be larger than 2(a+b)-2 (which is (probably) the largest possible n) except for the cases a=1|b=1 or a=b=2. The cases a=b=1 and a=b=2 have valid solutions that do not use exponents: * and /|U+U, respectively. For the rest of the cases where a=1,b>1, a**b=1 which can also be found with a%b and b**a=b which can also be found with b*a.
Concatenation is not included because it was shown to always be larger than n.
Input
2 positive integers.
Standard I/O methods are accepted. Standard loopholes are forbidden.
You can assume the input will always be within a valid range for your given language.
Output
A list or array of the mathematical operations that can be used with the inputs to generate every number from 1 to n inclusive where n is the smallest prime larger than the sum of the two inputs. (You do not need to output the value of n.)
Output can be in any format valid for your language so long as it is clearly understood. For instance, it can be an array where each value is a separate operation, a string with a delimiter between each value, or even just a solid string where each character is a different value.
You can use any character(s) so long as each possible result has a unique representation. For instance, +-*/%|^&U will work and so will 123456789, UNRELATID, and CODEgolf!. You are advised to include a legend or explanation of how the output can be read.
If more than one operation can be used to generate a given number, you may output any one of them. Do not output all of them.
Testcases
Input  |   n  |   Example Valid Output
-----------------------------------------
2, 3   |   7  |   Subtraction, Modulus, Bitwise OR, Unrelated, Addition, Multiplication, Unrelated
2, 3   |   7  |   -%|U+*U
2, 3   |   7  |   2579139
1, 1   |   3  |   [*,+,U]
6, 6   |  13  |   ["/","U","U","U","U","&","U","U","U","U","U","+","U"]
6,12   |  19  |   U/U&U-UUU^UUU|UUU+U
12,6   |  19  |   U/U&U-UUU^UUU|UUU+U
7,11   |  19  |   /U&-UU%UUUU^UU|UU+U
7,15   |  23  |   %/UUUU%-UUUUUU|UUUUUU+U  (2nd value is a floor divide)

(I can easily add more test cases if someone finds an interesting one.)
I think the test case outputs are all valid but I've been known to mistakes. Please tell me if you spot one.

Scoring
This is code-golf so fewest bytes wins!

That last one makes this a lot harder

@Cyoce By "the last one", do you mean Do not output all of them. ?

I mean the concatenation one.

None of your test cases require concatenation. Is there any that will? I'm not even sure if there's a case where concatenating the two numbers will not be larger than the smallest prime greater than their sum.

@mbomb007 I spent a few minutes thinking about that and, as far as I can tell, the concatenated results will always be greater than n. I'm not good enough to prove that but I think it's right.

Maybe just remove that operator, then.

Also, none of your test cases require exponentiation. That might be another similar case, since exponentiation grows so quickly.

@mbomb007 Floor division. I have now copied the note from the other question.

Maybe add the test case 6, 12, which requires b/a. Or an example where floor division is necessary.

If you decide to drop exponentiation later it may affect the output of at least one of your test cases. Specifically, 2, 3   |   7  |   257B13B.

Say a = 1, b = 5. Then exponentiation is needed to make 1.

@isaacg In that case, 1%5 also works.

What if there is a case where two different operations generate the same answer. eg. 2*2 and 2**2, so what do I output?

@Octopus Either one but only one. Can't be both. You can pick which one. Doesn't have to be the same every time. So long as you return a valid operation, it's OK.

@Octopus Technically, it wouldn't need to change the test case if I drop operations. I would just need to update my legend to explain that it's still hexadecimal but it's no longer just the index of where it appears in the list.

@isaacg but 1&5 is also 1

I think I've proven that the concatenation must be greater than the prime, unless I made an error: https://pastebin.com/EsR9AXNr

The final U is missing in test case 6,12

Jelly, 52 49 35 bytes
:;%;ạ;+;×;|;^;&;:@;%@
³çi
+ÆnRç@€%8

Try it online!
Explanation
:;%;ạ;+;×;|;^;&;:@;%@ - helper link 0, finds related numbers
:;%;ạ;+;×;|;^;&;:@;%@ - just lists all of the operations, separated by
                         `;` which appends each result to the previous
                         results. Uses `@` to reverse args on : and %

³çi                   - helper link 1, saves a byte in control flow
 ç                    - helper link 0, called on
³                     - first program input and
                         (implicit) second program input
   i                  - find the index of the input whole number in
                         the output list from helper link 0
+ÆnRç@€%8
+Æn                   - find the nearest prime greater than the sum
   R                  - all whole numbers less than or equal to the prime
    ç@€               - for each whole number, call helper link 1
                         with first argument second program input and
                         second argument the whole number
       %8             - modulo 8 each index: Maps the reversed argument
                         functions to the non-reversed functions

I think your TIO header has the letter O instead of the number 0 for Unrelated but the output seems correct.

JavaScript (ES6), 134 bytes
(a,b)=>eval("for(t=a+b,i=0;i=i<t;)for(++t;t%++i;);for(q=n='';n++<t;)[...'+-*/%^&|>'].every(o=>n^eval(a+(p=o)+b)&&n^eval(b+o+a)),q+=p")

Using the standard symbols for operations in JavaScript, except for unrelated that is >
Less golfed
(a,b)=>
{
  // find the smallest prime greater than the sum of a and b
  for (t = a + b, i = 0; i < t; )
    for(i=1, ++t; t % ++i; );

  // loop from 1 to t
  // accumulate output in q
  for(q='', n = 0; n++ < t; )
  {
    // try all binary operators
    // to avoid error in 'eval', I need a binary operator for 'unrelated', so I choose '>'
    [...'+-*/%^&|>'].every( // every terminates early if the result is false
      o => (
        p = o,
        n ^ eval(a+o+b) && n ^ eval(b+o+a)
      )
      // using xor to check for equality, the result is cast to integer
      // eventually flooring the division result
    )
    q += p
  }
  return q
}

Test

F=
(a,b)=>eval("for(t=a+b,i=0;i=i<t;)for(++t;t%++i;);for(q=n='';n++<t;)[...'+-*/%^&|>'].every(o=>n^eval(a+(p=o)+b)&&n^eval(b+o+a)),q+=p")

console.log(2,3,F(2,3))
console.log(1,1,F(1,1))
console.log(6,6,F(6,6))
console.log(6,12,F(6,12))
console.log(7,15,F(7,15))

nice use of every

Ruby, 131 129+7 = 138 135 bytes
Uses the -rprime flag.
C for concatenation and U for unrelated.
->a,b{(1..Prime.find{|i|i>a+b}).map{|i|("C+-*/%|^&".chars+["**",""]).find{|o|o.tr!?C,'';eval([a,b]*o)==i||eval([b,a]*o)==i}||?U}}

Try it online!

Jelly, 37 bytes
⁾ðɓ;@€”⁹;€“+ạ×d|^&”j”,¤v€⁸F
+Æni@€¢%8

Try it online! (footer formats the output from the native list of numbers to print a representation using the operation symbols from the question)
How?
Ignores checking of string concatenation and exponentiation as they are unnecessary.
Creates two (similar) links of Jelly code and evaluates them to evaluate to find the values of applying each of the 9 dyadic operations with the arguments in both orders. Flattens this into a single list and finds the index at which each value in the range [1,p] is first found, or 0. Takes the result modulo 8 to collapse the two values for each of reversed subtraction, reversed div and reversed mod to a single values.
⁾ðɓ;@€”⁹;€“+_×d|^&”j”,¤v€⁸F - Link 1: evaluate all operations: number a, number b
⁾ðɓ                         - literal "ðɓ"
      ”⁹                    - literal '⁹'
   ;@€                      - concatenate for €ach -> ["⁹ð","⁹ɓ"]
                      ¤     - nilad followed by link(s) as a nilad:
          “+_×d|^&”         -   literal "+_×d|^&"
                    ”,      -   literal ','
                   j        -   join -> "+,_,×,d,|,^,&"
        ;€                  - concatenate for €ach -> ["⁹ð+,_,×,d,|,^,&","⁹ɓ+,_,×,d,|,^,&"]
                         ⁸  - link's left argument, a
                       v€   - evaluate €ach with argument a:
                            - 1 ⁹ð+,_,×,d,|,^,&
                            -   ⁹               - right argument, b
                            -    ð              - dyadic chain separation
                            -      , , , , , ,  - pair results (yields a list like [[[[[[a+b,aạb],a×b],adb],a|b],a^b],a&b])
                            -     +             - addition
                            -       _           - subtraction
                            -         ×         - multiplication
                            -           d       - divmod (returns a pair of values)
                            -             |     - bitwise-or
                            -               ^   - bitwise-xor
                            -                 & - bitwise-and
                            -
                            - 2 ⁹ɓ+,_,×,d,|,^,& - just like above except:
                            -    ɓ              - dyadic chain separation
                            -                   - ...with argument reversal
                            -
                          F - flatten the two into one list

+Æni@€¢%8 - Main link: number a, number b
+         - addition -> a+b
 Æn       - next prime
      ¢   - call last link (1) as a dyad -> Link(1)(a, b) = [b+a,b-a,b*a,b/a,b%a,b|a,b^a,b&a,a+b,a-b,a*b,a/b,a%b,a|b,a^b,a&b]
   i@€    - first index for €ach (e.g. if a=8, b=3 and n=5 the first index of 5 is 10, a-b)
       %8 - modulo 8             (... 10%8 = 2, aligning with b-a. Same goes for / and %)

Python 2, 175 173 172 bytes
This doesn't handle exponentiation or concatenation, because I don't think there will ever be a case where they are necessary. `a`+`b` should always be greater than n. Same with a**b. If someone proves this one way or another, let me know.
a,b=input()
n=a+b+1
while 0 in[n%m for m in range(2,n)]:n+=1
for i in range(n):
 for o in'+-*/%|^&':
    x='a'+o+'b==i+1'
    if eval(x)+eval(x[::-1]):print o;break
 else:print 0

Try it online
Prints the operator for a solution, or 0 if unrelated.

while 0 in[n%m for m in range(2,n))]:n+=1 should save one byte

@PattuX Clever, but it's the same length.

The additional 0 in is 4 bytes while removing all and <1 removes 5 bytes.

Also for i in range(n): and then x='a'+o+'b==i+1' saves another 2 bytes.

https://tio.run/nexus/python2#RY7NCsIwEITP7lOEQk1jIroVeojkSUqFRKIG221J/enBd6@1Ch6GYeZjYHqTJMlolTOBuvstE0DGSicRnpdQe7ZlgUpKG3ZqI2umwKKls89yRUJUmqRB@KDwR6hIotAwT9qp53K92qSvw5JrWAyGWy5byZ0xgcMinJh/2DobhPx6qfUaK6G7GOjG2r2L3l6B@br3v247Tp9//1D7wR@zXuxnNuZqB6gQClVMwvwN

There's one closing bracket too much, it won't even compile like that. Here's the working 172 byte solution. - edit: oops, just realized I made that bracket mistake in my first comment, sorry!

Haskell, 163 162 bytes
import Data.Bits
f a b=[last$0:[n|(n,(#))<-zip[1..][(+),(-),(*),div,mod,(^),(.|.),(.&.),xor],a#b==c||b#a==c]|c<-[1..head[p|p<-[a+b+1..],all((>0).mod p)[2..p-1]]]]

Output is given as a list of integers, which correspond to operations as follows:
0 = Unrelated
1 = Addition
2 = Subtraction
3 = Multiplication
4 = Division
5 = Modulo
6 = Exponentiation
7 = Bitwise OR
8 = Bitwise AND
9 = Bitwise XOR
It will never output concatenation, since I've proven that it will never occur.
-1 byte by replacing /= with > in the primality test.

JS (ES6), 249 194 188 bytes
(a,b)=>{
  p=n=>{for(i=n;n%--i;);return i-1};    // return 0 if n is prime, non-zero otherwise
  for(n=a-~b;p(n);)n++;                 // increment n until it is prime
  for(z=Array(n).fill(0),               // set all to 'unrelated' (0) and ...
      o="+-*/%|^&",c=0;h=o[c];c++)      // loop through the various operators
    for(v="ab",q=2;q--;)                // try both a?b and b?a
      i=~~eval(v[q]+h+v[1-q]),          // calc the value and floor it
      i>n||i>0&&(z[i-1]=h);             // if within limits, record it
  return z
}

This is a complete overhaul of my original answer which was a 249 byte solution.
Technically this does potentially include exponentiation and concatenation, but since they never show up in the answers, I culled out the code. Heh.
A single line answer:
(a,b)=>{p=n=>{for(i=n;n%--i;);return i-1};for(n=a-~b;p(n);)n++;for(z=Array(n).fill(0),o="+-*/%|^&",c=0;h=o[c];c++)for(v="ab",q=2;q--;)i=~~eval(v[q]+h+v[1-q]),i>n||i>0&&(z[i-1]=h);return z}

f=
(a,b)=>{p=n=>{for(i=n;n%--i;);return i-1};for(n=a-~b;p(n);)n++;for(z=Array(n).fill(0),o="+-*/%|^&",c=0;h=o[c];c++)for(v="ab",q=2;q--;)i=~~eval(v[q]+h+v[1-q]),i>n||i>0&&(z[i-1]=h);return z}

console.log(f(2,3))
console.log(f(1,1))
console.log(f(6,6))
console.log(f(6,12))
console.log(f(7,15))

Recently, switched to stack snippet instead of tio.run and changed console.log(z) to return z. I was returning at first then switched to console.log because I though returning was against the rules. Its never quite clear to me when I'm allowed to return values rather than outputting them directly, but I see other golfers do it this way.
Also, Try it online! (redundant, I know, but I finally figured out tio.run.)

I'm having trouble with tio.run, having barely used it before. If anyone knows how to fix that, please let me know.

TIO doesn't have "regular" JS. As such, you cannot use it. You'd have to use a stack snippet.

@Luke, well I had it working and producing the correct results. It was only when I tried to make it a linkable, that it stopped doing as expected. Had it set to javascript-node.