mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-11 02:33:51 +00:00
DatetimeTZ should allow formatting date only
This commit is contained in:
parent
f344b211f6
commit
1578881e86
|
@ -3,7 +3,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { timestampms, timestampmsWithTimezone } from '@/shared/formatters';
|
||||
import { timestampms, timestampmsWithTimezone, timestampToDateString } from '@/shared/formatters';
|
||||
import { Component, Prop, Vue } from 'vue-property-decorator';
|
||||
|
||||
@Component({})
|
||||
|
@ -12,9 +12,14 @@ export default class DateTimeTZ extends Vue {
|
|||
|
||||
@Prop({ required: false, type: Boolean, default: false }) showTimezone!: boolean;
|
||||
|
||||
@Prop({ required: false, type: Boolean, default: false }) dateOnly!: boolean;
|
||||
|
||||
timestampms = timestampms;
|
||||
|
||||
get formattedDate(): string {
|
||||
if (this.dateOnly) {
|
||||
return timestampToDateString(this.date);
|
||||
}
|
||||
if (this.showTimezone) {
|
||||
return timestampmsWithTimezone(this.date);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user