     g = toGregorian jy, jm, jd
     [g.gy, g.gm, g.gd]
 
-
   makeDateFromStringAndFormat = (config) ->
     tokens = config._f.match formattingTokens
     string = config._i

      {jy, jm, jd} = toJalaali @year(), @month(), @date()
      {gy, gm, gd} = toGregorian jy, jm, input
      setDate.call this, gy, gm, gd
      jMoment.updateOffset this
      this
    else
      toJalaali(@year(), @month(), @date()).jd

      lastDay = Math.min jd, jMoment.jDaysInMonth input, jm
      {gy, gm, gd} = toGregorian input, jm, lastDay
      setDate.call this, gy, gm, gd
      moment.updateOffset this
      this
    else
      toJalaali(@year(), @month(), @date()).jy
