mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-16 19:46:48 +01:00
use created_date
This commit is contained in:
parent
bb15b744c8
commit
2ca691d3b8
9 changed files with 43 additions and 48 deletions
|
|
@ -1,7 +1,6 @@
|
|||
import { DatePipe } from '@angular/common'
|
||||
import { Inject, LOCALE_ID, Pipe, PipeTransform } from '@angular/core'
|
||||
import { SettingsService, SETTINGS_KEYS } from '../services/settings.service'
|
||||
import { normalizeDateStr } from '../utils/date'
|
||||
|
||||
const FORMAT_TO_ISO_FORMAT = {
|
||||
longDate: 'y-MM-dd',
|
||||
|
|
@ -34,7 +33,6 @@ export class CustomDatePipe implements PipeTransform {
|
|||
this.settings.get(SETTINGS_KEYS.DATE_LOCALE) ||
|
||||
this.defaultLocale
|
||||
let f = format || this.settings.get(SETTINGS_KEYS.DATE_FORMAT)
|
||||
if (typeof value == 'string') value = normalizeDateStr(value)
|
||||
if (l == 'iso-8601') {
|
||||
return this.datePipe.transform(value, FORMAT_TO_ISO_FORMAT[f], timezone)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue