text: import toDate from '../toDate/index.js'
  import toInteger from '../_lib/toInteger/index.js'
  
  /**
   * @name fromUnixTime
   * @category Timestamp Helpers
   * @summary Create a date from a Unix timestamp.
   *
   * @description
   * Create a date from a Unix timestamp.
   *
   * @param {Number} unixTime - the given Unix timestamp
   * @param {Options} [options] - the object with options. See [Options]{@link https://date-fns.org/docs/Options}
   * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}
   * @returns {Date} the date
   * @throws {TypeError} 1 argument required
   * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2
   *
   * @example
   * // Create the date 29 February 2012 11:45:05:
   * var result = fromUnixTime(1330515905)
   * //=> Wed Feb 29 2012 11:45:05
   */
  export default function fromUnixTime(dirtyUnixTime, dirtyOptions) {
    if (arguments.length < 1) {
      throw new TypeError(
        '1 argument required, but only ' + arguments.length + ' present'
      )
    }
  
    var unixTime = toInteger(dirtyUnixTime)
  
    return toDate(unixTime * 1000, dirtyOptions)
  }
  