• 把天数、小时数,分钟数转换毫秒数

    参数

    • 可选__namedParameters: {
          minutes?: number;
          seconds?: number;
          hours?: number;
          days?: number;
      } = {}
      • 可选minutes?: number
      • 可选seconds?: number
      • 可选hours?: number
      • 可选days?: number

    返回 number

    const fn = t.getMilliseconds;

    fn(); // 0
    fn({ seconds: 1 }); // 1000
    fn({ seconds: 1.5 }); // 1500
    fn({ seconds: 60 }); // 1000 * 60
    fn({ minutes: 1 }); // 1000 * 60
    fn({ minutes: 1.5 }); // 1000 * 90
    fn({ minutes: 1 }); // === fn({ seconds: 60 })
    fn({ minutes: 1.5 }); // === fn({ seconds: 90 })
    fn({ hours: 1 }); // === fn({ minutes: 60 })
    fn({ days: 1 }); // === fn({ hours: 24 })
    fn({ days: 1.5 }); // === fn({ hours: 36 })