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

      {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 jy, input
      {gy, gm, gd} = toGregorian jy, input, lastDay
      setDate.call this, gy, gm, gd
      moment.updateOffset this
      this
    else
      toJalaali(@year(), @month(), @date()).jm
