Date Logic calculation



Please help me on below logic:

Logic 1:
if (Sys date = 1st working day of Month) then {Boek Datum = Last day of Previous Month}
Else {Boek Datum = Todays Date.}

Date is entered in the 3 fields in DD / MM/ YYYY format.

Logic 2:
If {System Date = 1st working day of Month then Boek Periode} then {Boek Periode = Previous Month and Current Year in MM YYYY Format.}
Else {Boek Periode = current Month and Year in MM YYYY Format.}

Logic 3:
This always has a value of SysDate() - 1. Format is DD MM YYYY
Value is always entered by system. No changes allowed.”