Because date command is different a kind of solution might be if detect correct platform:
#!/bin/sh
VAR='2014-03-15'
platform='uknown'
str="$(uname)"
if [ "$str" == 'Linux' ]; then
platform='linux'
elif [ "$str" == 'FreeBSD' ]; then
platform='freebsd'
fi
Then according to the platform you can do:
if [ "$platform" == 'linux' ]; then
date -d "$VAR" +'%Y-%m-%d'
elif [ "$platform" == 'freebsd' ]; then
date -jf "%Y-%m-%d" "$VAR" +'%Y-%m-%d'
fi
Also I think you are missing format for the command:
date -jf $VAR +'%Y-%m-%d'
I think i should be:
date -jf "format" $VAR +'%Y-%m-%d'