I want to get the last date in a month. I let the user choose a date, for example 20050509 and want the "result" to be 20050531.