export default class Utils {
  static paddingZero(num) {
    return `0${num}`.slice(-2);
  }

  static toFormatDate(date) {
    const y = date.getFullYear();
    const m = this.paddingZero(date.getMonth() + 1);
    const d = this.paddingZero(date.getDate());
    return `${y}-${m}-${d}`;
  }

  static getToday() {
    return this.toFormatDate(new Date());
  }

  static getYeasterday() {
    const now = new Date();
    const yesterday = new Date(now.getFullYear(), now.getMonth() + 1, now.getDate() - 1);

    return this.toFormatDate(yesterday);
  }

  static getTomorrow() {
    const now = new Date();
    const tomorrow = new Date(now.getFullYear(), now.getMonth() + 1, now.getDate() + 1);

    return this.toFormatDate(tomorrow);
  }

  static isToday(date) {
    const now = new Date();
    const today = new Date(now.getFullYear(), now.getMonth() + 1, now.getDate(), 0, 0, 0);

    const dateAry = date.split('-').map(s => parseInt(s, 10));
    const dispDate = new Date(dateAry[0], dateAry[1], dateAry[2], 0, 0, 0);

    return today.getTime() === dispDate.getTime();
  }
}

@@ -299,213 +299,182 @@
 tic 
-getToday() %7B%0A    return this.toFormatDate(new Date());%0A  %7D%0A%0A  static getYeasterday() %7B%0A    const now = new Date();%0A    const yesterday = new Date(now.getFullYear(), now.getMonth() + 1, now.getDate() - 1);%0A
+toDate(formatedDate) %7B%0A    const ary = formatedDate.split('-').map(s =%3E parseInt(s, 10));%0A    return new Date(ary%5B0%5D, ary%5B1%5D - 1, ary%5B2%5D, 0, 0, 0);%0A  %7D%0A%0A  static getToday() %7B
 %0A   
@@ -503,17 +503,18 @@
 ate(
-yesterday
+new Date()
 );%0A 
@@ -533,46 +533,90 @@
  get
-Tomorrow() %7B%0A    const now = new Date(
+RelativeDate(formatedBaseDate, diff) %7B%0A    const bd = this.toDate(formatedBaseDate
 );%0A 
@@ -624,24 +624,18 @@
   const 
-tomorrow
+rd
  = new D
@@ -630,35 +630,34 @@
 t rd = new Date(
-now
+bd
 .getFullYear(), 
@@ -648,35 +648,34 @@
 .getFullYear(), 
-now
+bd
 .getMonth() + 1,
@@ -665,33 +665,28 @@
 d.getMonth()
- + 1, now
+, bd
 .getDate() +
@@ -686,17 +686,20 @@
 ate() + 
-1
+diff
 );%0A%0A    
@@ -727,16 +727,10 @@
 ate(
-tomorrow
+rd
 );%0A 
@@ -882,148 +882,8 @@
 );%0A%0A
-    const dateAry = date.split('-').map(s =%3E parseInt(s, 10));%0A    const dispDate = new Date(dateAry%5B0%5D, dateAry%5B1%5D, dateAry%5B2%5D, 0, 0, 0);%0A%0A
     
@@ -913,16 +913,25 @@
 === 
-dispDate
+this.toDate(date)
 .get

Refactor date util methods