#_'(new Date(new Date().getFullYear() - 1, new Date().getMonth(), new Date().getDate())).toLocaleDateString()'_#
JavaScript is gross. Do what @jwphillips said and make a function. I have a library called “HelperFuncs” for stuff like this. Little one-liners and whatnot.