def datetime formatcode
        deminutified = formatcode.downcase.gsub(/(?<hrs>H|h)(?<div>.)m/, '\k<hrs>\k<div>i')
                         .gsub(/im/, 'ii')
                         .gsub(/m(?<div>.)(?<secs>s)/, 'i\k<div>\k<secs>')
                         .gsub(/mi/, 'ii')
        return deminutified.gsub(/[yMmDdHhSsi]*/, Dtmap)
      end
def datetime formatcode
        deminutified = formatcode.downcase.gsub(/(?<hrs>H|h)(?<div>.)m/, '\k<hrs>\k<div>i')
                         .gsub(/im/, 'ii')
                         .gsub(/m(?<div>.)(?<secs>s)/, 'i\k<div>\k<secs>')
                         .gsub(/mi/, 'ii')
        return deminutified.gsub(/[yMmDdHhSsi]*/, Dtmap)
      end
Convert excel-style date formats into ruby DateTime strftime format strings
 @param [String] formatcode an Excel number format string.
 @return [String] a DateTime::strftime format string.