aboutsummaryrefslogblamecommitdiffhomepage
path: root/src/util/index.js
blob: 5bc0a7836eb2884f228ab74950415763b764bcf3 (plain) (tree)
1
2
3
4
5
6
7
8







                                                       
import DateTimeFormat from 'gregorian-calendar-format';

export function getFormatter(format, locale) {
  if (typeof format === 'string') {
    return new DateTimeFormat(format, locale.format);
  }
  return format;
}