bin and binr on dates

q)2013.01.01 2013.01.05 2013.01.10 bin 2013.01.06
1
q)2013.01.01 2013.01.05 2013.01.10 bin 2013.01.06 2013.01.03
1 0
q)2013.01.01 2013.01.05 2013.01.10 binr 2013.01.06
2
q)2013.01.01 2013.01.05 2013.01.10 binr 2013.01.06 2013.01.03
2 1
q)2013.01.01 2013.01.05 2013.01.10 binr 2013.01.06 2013.01.06    / I am expecting 2 2, why 1 1??
1 1
q)2013.01.01 2013.01.05 2013.01.10 binr 2013.01.06 2013.01.06 2013.01.01
2 2 0
q)2013.01.01 2013.01.05 2013.01.10 bin 2013.01.06 2013.01.06
1 1

looks like a bug for binr with int vectors.
workaround: cast both sides to longs.

q)(long$2013.01.01 2013.01.05 2013.01.10) binr long$2013.01.06 2013.01.06

2 2

that’s fixed in kdb+3.2 2014.11.18

thanks for reporting it.

thank you

The expressions in my first post are good on the new version,
but something else looks wrong.

q)(long$2013.01.01 2013.01.05 2013.01.10) binr long$2013.01.05 2013.01.05
1 1
q)2013.01.01 2013.01.05 2013.01.10 binr 2013.01.05 2013.01.05
2 2
q).z.k
2014.11.18

thanks - fixed in kdb+3.2 2014.11.26