Skip to content

Commit

Permalink
Use written out date and swap date time rows in long format
Browse files Browse the repository at this point in the history
  • Loading branch information
patudom committed Aug 22, 2024
1 parent ac24e7f commit 0435674
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/TimeDisplay.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<template>
<div class="td__container">
<div class="td__date" v-if="props.showDate && !props.shortTimeDate">
<span class="td__date_date">
{{ props.date.toLocaleString('default', { month: 'long' }) }} {{ pad(props.date.getDate()) }}, {{ props.date.getFullYear() }}
</span>
</div>
<div class="td__time" v-if="!props.shortTimeDate">
<span class="td__time_time">{{ pad(hours) }}:{{ pad(props.date.getMinutes()) }}:{{ pad(props.date.getSeconds()) }} {{ props.ampm ? ampm : '' }}</span>
</div>
<div class="td__date" v-if="props.showDate && !props.shortTimeDate">
<span class="td__date_date">{{ props.date.getFullYear() }}-{{ pad(props.date.getMonth() + 1) }}-{{ pad(props.date.getDate()) }}</span>
</div>
<div class="td__timezone" v-if="props.showTimezone && !props.shortTimeDate">
<span class="td__timezone_tz">{{ props.timezone }}</span>
</div>
Expand Down

0 comments on commit 0435674

Please sign in to comment.