Here's my working function:
$IsNull(<DateCustom>,<Year (yyyy)>,$If(<DateCustom>="00.00",<Year>,$If($IsMatch(<DateRaw>,"^[\d]{6}$")="T", $Date($Left(<DateRaw>,4)/$Right(<DateRaw>,2),MMM yyyy), $Date($Left(<DateRaw>,4)/$Left($Right(<DateRaw>,4),2)/$Right(<DateRaw>,2),MMM d"," yyyy))))
Upon restarting, it doesn't work anymore because it turns into the following:
$IsNull(<DateCustom>,<Year (yyyy)>,$If(<DateCustom>=00.00,<Year>,$If($IsMatch(<DateRaw>,^[\d]{6}"$")="T"," "$Date($Left(<DateRaw>,4)/$Right(<DateRaw>,2),MMM yyyy)," "$Date($Left(<DateRaw>,4)/$Left($Right(<DateRaw>,4),2)/$Right(<DateRaw>,2),MMM d, yyyy))))
EDIT: Actually, the function is validated, applied and then saved. The dates show up accordingly. When I go back to the tag customization menu, there's an exclamation mark next to this virtualtag indicating the bolded changes above rendering it non-functional.