function addAbbreviatedLocale() {
  const initialLocale = moment.locale();

  moment.locale("en-abbreviated", {
    relativeTime: {
      future: "in %s",
      past: "%s",
      s: "%d s",
      ss: "%d s",
      m: "%d m",
      mm: "%d m",
      h: "%d h",
      hh: "%d h",
      d: "%d d",
      dd: "%d d",
      w: "%d wk",
      ww: "%d wks",
      M: "a mth",
      MM: "%d mths",
      y: "%d y",
      yy: "%d y",
    },
  });

  moment.locale(initialLocale);
}
// also, you can't define a custom locale on a local instance
also, you can't define a custom locale on a local instance
also you can ' t define a custom locale on a local instance
function addAbbreviatedLocale() {
  const initialLocale = moment.locale();
  moment.locale("en-abbreviated", {
    relativeTime: {
      future: "in %s",
      past: "%s",
      s: "%d s",
      ss: "%d s",
      m: "%d m",
      mm: "%d m",
      h: "%d h",
      hh: "%d h",
      d: "%d d",
      dd: "%d d",
      w: "%d wk",
      ww: "%d wks",
      M: "a mth",
      MM: "%d mths",
      y: "%d y",
      yy: "%d y",
    },
  });
  moment.locale(initialLocale);
}
function addAbbreviatedLocale ( ) { const initialLocale = moment . locale ( ) ; moment . locale ( "en-abbreviated" , { relativeTime : { future : "in %s" , past : "%s" , s : "%d s" , ss : "%d s" , m : "%d m" , mm : "%d m" , h : "%d h" , hh : "%d h" , d : "%d d" , dd : "%d d" , w : "%d wk" , ww : "%d wks" , M : "a mth" , MM : "%d mths" , y : "%d y" , yy : "%d y" , } , } ) ; moment . locale ( initialLocale ) ; }
also, you can't define a custom locale on a local instance
also you can ' t define a custom locale on a local instance