import dayjs from 'dayjs';
export function addFormMinute(timerStr: string, time = 0) {
  const timer = dayjs('2021-12-17' + ' ' + timerStr).add(time, 'minute');
  return timer.format('HH:mm:ss');
}
export function addFormMinuteAddS(timerStr: string, time = 0) {
  const timer = dayjs('2021-12-17' + ' ' + timerStr)
    .add(time, 'minute')
    .add(1, 'second');
  return timer.format('HH:mm:ss');
}
export function addFormMinuteMS(timerStr: string, time = 0) {
  const timer = dayjs('2021-12-17' + ' ' + timerStr)
    .add(time, 'minute')
    .subtract(1, 'second');
  return timer.format('HH:mm:ss');
}
export function reduceFormMinute(timerStr: string, time = 0) {
  const timer = dayjs('2021-12-17' + ' ' + timerStr).subtract(time, 'minute');
  return timer.format('HH:mm:ss');
}
export function reduceFormMinuteAddS(timerStr: string, time = 0) {
  const timer = dayjs('2021-12-17' + ' ' + timerStr)
    .subtract(time, 'minute')
    .add(1, 'second');
  return timer.format('HH:mm:ss');
}
export function reduceFormMinuteMS(timerStr: string, time = 0) {
  const timer = dayjs('2021-12-17' + ' ' + timerStr)
    .subtract(time, 'minute')
    .subtract(1, 'second');
  return timer.format('HH:mm:ss');
}
