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