As a DBA, you are expected to be more diligent about your work, more experienced in everything you do - especially if you've never done it before, and know a lot...
So you're trying to use the function to define the function? For example, the isFriday is defined by checking the value of isFriday. Would love to see a data set...