google apps script - spreadsheet function LEFT() in script
===

I am trying to write a script function to return the left-most three characters from the string returned from the built-in Date() function. If Date() returns "Mon Jul 16 2012 20:49:25 GMT-0400 (EDT)" I want to return from my GAS function "Mon".

This code works fine to get the entire date:

    function DateFormatted(){
    return Date(); 
    }

But this throws error on script save "Reference error Left not recognized"

    function DateFormatted(){
    return Left(Date(),3); 
    }

 
It seems Left() exists because it is listed here: 
https://support.google.com/docs/bin/static.py?hl=en&topic=25273&page=table.cs&tab=1240296 
And directly in cell (no script) this works fine:   =Left("abcdef",3)
I tried Mid() but same result of not recognized

Any suggestions? My wild guess is that there is a special syntax within scripts for using a built-in spreadsheet function, but I don't know why Date() works fine. Or maybe not all functions listed for spreadsheets are actually available for use in GAS?

Thanks.

