I like writing my own formulas inside of Google Docs Spreadsheets. But often what I want to do is very similar to a function that already exists. As an example, I couldn't find a function to turn a date (31-Aug-2010) into the lexical day of the week (Tuesday). I'd like to write:
=LexWeekDay('31-Aug-2010')
'Tuesday'
Clearly I can write all of this logic using core javascript, but there already exists a normal spreadsheet function called WEEKDAY()
which takes a date and converts into into a number representing the day of the week [0 => Sunday, 1=> Monday, etc]
.
How can I access this function (or generally any function), that speadsheets already define, from my custom script?