import n from "./index-addLeadingZeros.js";
var i = {
  // Year
  y: function(t, e) {
    var a = t.getUTCFullYear(), u = a > 0 ? a : 1 - a;
    return n(e === "yy" ? u % 100 : u, e.length);
  },
  // Month
  M: function(t, e) {
    var a = t.getUTCMonth();
    return e === "M" ? String(a + 1) : n(a + 1, 2);
  },
  // Day of the month
  d: function(t, e) {
    return n(t.getUTCDate(), e.length);
  },
  // AM or PM
  a: function(t, e) {
    var a = t.getUTCHours() / 12 >= 1 ? "pm" : "am";
    switch (e) {
      case "a":
      case "aa":
        return a.toUpperCase();
      case "aaa":
        return a;
      case "aaaaa":
        return a[0];
      case "aaaa":
      default:
        return a === "am" ? "a.m." : "p.m.";
    }
  },
  // Hour [1-12]
  h: function(t, e) {
    return n(t.getUTCHours() % 12 || 12, e.length);
  },
  // Hour [0-23]
  H: function(t, e) {
    return n(t.getUTCHours(), e.length);
  },
  // Minute
  m: function(t, e) {
    return n(t.getUTCMinutes(), e.length);
  },
  // Second
  s: function(t, e) {
    return n(t.getUTCSeconds(), e.length);
  },
  // Fraction of second
  S: function(t, e) {
    var a = e.length, u = t.getUTCMilliseconds(), o = Math.floor(u * Math.pow(10, a - 3));
    return n(o, e.length);
  }
};
export {
  i as default
};
