Code for setting the time with a 5 way tactile switch/buttons

Ive searched around some but can't come up with anything. Seems like I wouldn't be the first to need this.
I have a 5way tactile switch (like a joystick), and an LCD display, and an RTC in my project. I wonder if someone has written a nice format for allowing the user to set the clock. If their RTC or LCD is a little different than mine, it wouldn't be that hard to adjust the code for to fit mine.

I'll say I haven't searched diligently, because I can't figure out just how to word a search for this, but I'm sure others have done something like this?

My 5-way tactile switch

My RTC

My LCD

Thanks.

I used just two buttons for setting up the time:
http://timewitharduino.blogspot.ca/2012/04/bookclock-software-update-set-time-from.html[/url]

Thanks, I'll check that out. Trying to debounce 5 buttons is starting to make my eyes bounce! :disappointed_relieved:

Here is my code for an arduino alarm clock. Part of it has date and time adjust. Works on arduino 1.0

http://code.google.com/p/phi-prompt-user-interface-library/downloads/detail?name=Phi_2_project_alarm_clock_v5.zip&can=2&q=

The project assumes 6 buttons but you can leave the last button empty (it's escape)

The library for the project:

http://code.google.com/p/phi-prompt-user-interface-library/downloads/detail?name=libraries.zip&can=2&q=