xufenglei
2018-02-24 9e00209b2f1147759d4935e99f4c6ce3db0cb9a5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import {Injectable} from '@angular/core';
 
import * as moment from 'moment';
 
@Injectable()
export class DateService {
 
  date_format(date: string, format: string) {
    return moment(date).format(format);
  }
 
  today(format: string) {
    return moment().format(format);
  }
}