how do you send a one-shot function?

i have had a lot of trouble in my scripts trying to call a function once and only once where something like a days passed GUI for example, is concerned.

if(Sun.eulerAngles.x > 359){

dayPassed();

}

because it is in the update function anything i call in there is generally done at random never just once.

So how do i take multiple calls to a function and turn them into just 1 ??

Just add a flag to stop the statement being executed more than once.

private bool _isDone = false;

if(Sun.eulerAngles.x > 359 && !_isDone){
     dayPassed();
     _isDone = true;
}