# File lib/runt/pdate.rb, line 86
    def PDate.to_date(pdate)
      if( pdate.date_precision > DPrecision::DAY) then
        DateTime.new(pdate.year,pdate.month,pdate.day,pdate.hour,pdate.min,pdate.sec)
      end
      return Date.new(pdate.year,pdate.month,pdate.day)
    end