Last Updated: February 25, 2016
·
3.102K
· dionysios

Day of the Week in Q

The way dates are represented in Q makes it easy to find the day of the week when given the date.
Since all dates are internally stored as integers corresponding to the number of days since 2000.01.01 and since that date happened to be a Saturday, a simple function to give the day is:

todayIs ::`Sat`Sun`Mon`Tue`Wed`Thu`Fri .z.D mod 7