Sounds like the Unix program needs some re-engineering. If the date is allowed to go beyond the end of the month, then the date should end up with a valid date in the next month.
If this date isn't being acted upon in any way (say, as part of a count for net due day, etc) then I would say convert the date to a char value.