Through Space and Time
Perl 6, 47 46 bytes
-1 byte thanks to nwellnhof
{Set(@^b X<=>Date.today.year)>2,max [Z==] @^a}
Try it online!
Anonymous code block that takes two lists and returns a tuple of booleans, with the first element being whether you traveled in time, and the second being whether you didn't traveled in space.
Explanation
{ } # Anonymous code block
@^b X # Map each element of the year list to:
<=> # Whether it is smaller, equal or larger than
Date.today.year # The current year
Set( ) # Get the unique values
>2 # Is the length larger than 2?
,
[Z ] @^a # Reduce by zipping the lists together
max # And return if any of them are
== # All equal
Python 2, 111 109 bytes
lambda S,T:(min(map(len,map(set,zip(*S))))>1,date.today().year in sorted(set(T))[1:-1])
from datetime import*
Try it online!
Japt, 22 bytes
Takes input as a 2D-array of integers for the space dimensions and a 1D-array of integers for the years. Outputs 2
for space only, 1
for time only, 3
for both and 0
for neither.
yâ mÊeÉ Ñ+!Jõ kVmgKi¹Ê
Try it
:Implicit input of 2D-array U=space and array V=time
y :Transpose U
â :Deduplicate columns
m :Map
Ê : Lengths
e :All truthy (not 0) when
É : 1 is subtracted
Ñ :Multiply by 2
J :-1
õ :Range [-1,1]
k :Remove all the elements present in
Vm : Map V
g : Signs of difference with
Ki : The current year
¹ :End removal
Ê :Length
+! :Negate and add first result