Date and Time validator, updater

Can someone point me to a date/time validator or updater.

I have an event start datetime and an event end datetime. I want
to validate that the end datetime is after the start datetime.

Figure there is some code or library out there already, if you
know one, please forward it.

Thank you!

Scott Parks wrote:

Can someone point me to a date/time validator or updater.

I have an event start datetime and an event end datetime. I want
to validate that the end datetime is after the start datetime.

Figure there is some code or library out there already, if you
know one, please forward it.

You don't really need a library to do this, it's as simple as:

def validate
   errors.add("end", "is before start") unless start <= end
end

You have got to be kidding me? It's that easy? I think I need to get my
head out of the book (examples) and read some of the more in depth articles.

Thank you!

Thank you! This looks to do what I need to solve and more! Thanks for the tip.
-Scott