# What's the current zodiac?

## JavaScript (ES6),  168 165 160 157  155 bytes

Saved 4 bytes thanks to @Neil

Returns the crocodile for the 5th zodiac in Persia.

([a,b,c,,d,e])=>String.fromCodePoint(127998-~'00111321211'[k=-~(d+e)%24>>1]+k*2-~(1e12+{IRN:121010020100,VNM:1010001e4,KAZ:3e7,JPN:1,THA:2}[a+b+c]+a)[k+1])


Try it online!

### How?

We define $$\k\$$ as the 0-based index of the zodiac, which can be deduced from the hour $$\h\$$ with:

$$k=\lfloor ((h+1)\bmod 24)/2\rfloor$$

We define $$\x_k\$$ such that the base offset $$\b_k\$$ of the code point for a given zodiac is:

$$b_k = 2k+x_k$$

The final code point is $$\128000+b_k+c_k\$$, where $$\c_k\$$ is the country offset.

This is summarized in the following table:

   k =  |   0 |   1 |   2 |   3 |   4 |   5 |   6 |   7 |   8 |   9 |  10 |  11
--------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----
b(k)  |  +0 |  +2 |  +5 |  +7 |  +9 | +13 | +14 | +15 | +18 | +19 | +21 | +22
= 2k  |   0 |   2 |   4 |   6 |   8 |  10 |  12 |  14 |  16 |  18 |  20 |  22
+x(k) |   0 |   0 |   1 |   1 |   1 |   3 |   2 |   1 |   2 |   1 |   1 |   0
--------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----
IRN  |  +1 |  +2 |  +1 |     |  +1 |     |     |  +2 |     |  +1 |     |
VNM  |     |  +1 |     |  +1 |     |     |     |  +1 |     |     |     |
KAZ  |     |     |     |     |  +3 |     |     |     |     |     |     |
JPN  |     |     |     |     |     |     |     |     |     |     |     |  +1
THA  |     |     |     |     |     |     |     |     |     |     |     |  +2


### Commented

( [ a, b, c,               // a,b,c = country code
,                      // the space is ignored
d, e ] ) =>            // d,e = hour (minutes are ignored)
String.fromCodePoint(    // return the character whose code point is:
127998                 //   127998
-~'00111321211'[       //   + 1 + x(k)
k = -~(d + e)        //   where k is defined as:
% 24 >> 1        //     floor(((hour + 1) mod 24) / 2)
] +                    //
k * 2                  //   + 2k
-~(                    //   + 1 + the country offset
1e12 +               //     each pattern being encoded as 10**12
{                    //     + a specific value, leading to:
IRN: 121010020100, //       IRN -> 1121010020100
VNM: 1010001e4,    //       VNM -> 1010100010000
KAZ: 3e7,          //       KAZ -> 1000030000000
JPN: 1,            //       JPN -> 1000000000001
THA: 2             //       THA -> 1000000000002
}[a + b + c]         //     according to the country code
+ a                  //     coerced to a string
)[k + 1]               //   extract the correct offset for this zodiac
)                        //   (gives something NaN-ish for the other countries)


þт÷;ò12%Ð•kÄ$ó·;@è₂Èαвλã…7q¼#∍o•5в6ä.•xиʒaàÒ¾Äλ•u3ôIákèsèžy₄*Oç  Try it online! ## PHP, 185 chars, 263 bytes Thanks to Dannyu NDos for bug fix. fn($i)=>strlen($b=[[,],[,,],[,],[,,],[,,,],,,[,,],,[,],,[,4=>,5=>]][(($t=$i.$i)%2?$t+1:$t)%24/2])?$b:$b[strpos(____IRN_VNM_KAZ_JPN_THA,substr(\$i,0,3))/4]


Try it online!

Just a simple array mapping, there should be better ways to golf this. Hour part of input time is converted to an even number (0-22) and then it is divided by 2 to get array index 0 to 11 in the mapping. Time periods with special cases are a sub-array with index 0 mapped to default sign and 1-5 mapped to the special sign for IRN, VNM, KAZ, JPN and THA in same order.