(date: Date, time: Date, withoutSuffix, config: DateParsingConfig)
| 4 | |
| 5 | // todo: implement |
| 6 | export function from(date: Date, time: Date, withoutSuffix, config: DateParsingConfig): string { |
| 7 | if (isDateValid(date) && isDateValid(time)) { |
| 8 | createDuration({ to: date, from: time }); |
| 9 | |
| 10 | return 'todo: implement'; |
| 11 | } |
| 12 | |
| 13 | return 'not valid date'; |
| 14 | // if (this.isValid() && |
| 15 | // ((isMoment(time) && time.isValid()) || |
| 16 | // createLocal(time).isValid())) { |
| 17 | // return createDuration({ to: this, from: time }).locale(this.locale()).humanize(!withoutSuffix); |
| 18 | // } else { |
| 19 | // return this.localeData().invalidDate(); |
| 20 | // } |
| 21 | } |
| 22 | |
| 23 | // export function fromNow(withoutSuffix) { |
| 24 | // return this.from(createLocal(), withoutSuffix); |
no test coverage detected