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
Written by Dionysios Barmpoutis
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#