All files / src/utils scheduled_replace_at.ts

100% Statements 10/10
100% Branches 3/3
100% Functions 1/1
100% Lines 10/10

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 131x 5x 1x 1x 4x 4x 4x 4x 4x 4x      
const scheduledReplaceAtConverter = (scheduled_replace_at: string | null): string => {
  if (scheduled_replace_at === null) {
    return '未定';
  }
  const year: number = parseInt(scheduled_replace_at.slice(0, 4));
  const month: number = parseInt(scheduled_replace_at.slice(5, 7));
  const date: number = parseInt(scheduled_replace_at.slice(8, 10));
  const result: string = `${year}年 ${month}月 ${date}日`;
  return result;
};
 
export { scheduledReplaceAtConverter };