Prettier code cleanup for .ts files

See #182
This commit is contained in:
Michael Shamoon
2022-03-11 10:53:32 -08:00
parent f8c8161a3e
commit f34202a82a
159 changed files with 3882 additions and 2716 deletions

View File

@@ -1,16 +1,15 @@
import { Injectable } from "@angular/core";
import { NgbDateAdapter, NgbDateStruct } from "@ng-bootstrap/ng-bootstrap";
import { Injectable } from '@angular/core'
import { NgbDateAdapter, NgbDateStruct } from '@ng-bootstrap/ng-bootstrap'
@Injectable()
export class ISODateTimeAdapter extends NgbDateAdapter<string> {
fromModel(value: string | null): NgbDateStruct | null {
if (value) {
let date = new Date(value)
return {
day : date.getDate(),
month : date.getMonth() + 1,
year : date.getFullYear()
day: date.getDate(),
month: date.getMonth() + 1,
year: date.getFullYear(),
}
} else {
return null
@@ -18,6 +17,8 @@ export class ISODateTimeAdapter extends NgbDateAdapter<string> {
}
toModel(date: NgbDateStruct | null): string | null {
return date ? new Date(date.year, date.month - 1, date.day).toISOString() : null
return date
? new Date(date.year, date.month - 1, date.day).toISOString()
: null
}
}