It would be simpler to create formulas like the following than it would be to modify the built-in functions:
//{@firsthalfcurrFY}:
if {table.date} in date({?year}-1, 07, 01) to date({?year}-1, 12,31) then {table.amount}
//{@secondhalfcurrFY}:
if {table.date} in date({?year}, 01, 01) to date({?year}, 06,30) then {table.amount}
//{@firsthalfprevFY}:
if {table.date} in date({?year}-2, 07, 01) to date({?year}-2, 12,31) then {table.amount}
//{@secondhalfprevFY}:
if {table.date} in date({?year}-1, 01, 01) to date({?year}-1, 06,30) then {table.amount}
...where {?year} is the ending year of the current fiscal year.
-LB