I've been trying to write some scheduling software for the place I work for (a microscopy lab) and I've gotten bogged down in adding appointment times. I'm not exactly sure what code I would need for this. I know handling dates is tricky.
What I have so far in pseudocode is that I have to check whether the appointment that a person is trying to schedule right now envelops a pre-existing appointment (starts before the existing starting time and ends after the existing ending time of an appointment), or whether that appointment is completely enveloped by the already existing appointment, or the starting time for the intended appointment is before the existing appointment, however, the ending time is after the after the existing starting time of the appointment, and whether the starting time of the intended appointment is before the ending time of the pre-existing appointment, but the ending time is ok. And I know I need to check for all the appointments that day so I need to loop through this until I've gone through all the appointments for that day.
I don't know if I'm going about this the right way and even if I am, I'd appreciate it if I could get a little coding help as this is kinda over my head, although I didn't think so at the time.
------------------
(\__/) See the bunny.
(='.'=) Hear the bunny.
(") (") Pet the bunny.
BE the bunny.





Reply With Quote