Well, let's break that line down:
:local month ([:find $months [:pick $date 0 3 ]] + 1)
1.
Creates a variable called "month" with a value determined in the brackets.
2.
A value is being formed from whatever the command between "[" and "]" returns, plus 1.
3.
The ":find" command, when applied to an array (and in this case, $months is an array) will return the
index of the element that has a certain value. In this case, the value is specified as being whatever the command between "[" and "]" returns. Here, it's important to note that arrays are comprised of multiple values, with each being accessible by an index.
Note that in
:local months ("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec")
"jan" is at index 0, "feb" is at index 1, and so on up to "dec" which is at index 11.
4.
When applied to a string (and $date is a string), it gets a portion of the string, starting at the position specified in the second argument (0 in this case), and from that point on gets the number of characters specified in the third argument (3 in this case).
Because of how the date is formatted, getting the first 3 characters is always going to be one of "jan", "feb", etc.
Let's backtrack from that...
5.
:find $months [:pick $date 0 3]
This will always return a number between 0 and 11, since the first 3 characters are always a month name, and the $months array contains nothing but month names.
6.
:local month ([:find $months [:pick $date 0 3 ]] + 1)
Because of the way $months is structured, having 1 added to a number between 0 and 11 is always going to essentially convert the month name to the month's number.