We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8adbed6 + 0de0ac2 commit 3d5d933Copy full SHA for 3d5d933
src/components/jobs/JobListing.vue
@@ -9,7 +9,7 @@
9
<div class="salary-info">
10
<b-badge v-if="job.salary_min > 0" class="salary-badge">{{ salary }}</b-badge>
11
</div>
12
- <p class="subtitle">Posted at </p>
+ <p class="subtitle">Posted {{ formattedDate }}</p>
13
14
15
<!-- Render the description with markup support -->
@@ -51,6 +51,17 @@ export default defineComponent({
51
}
52
},
53
computed: {
54
+ formattedDate() {
55
+ const job = this.job
56
+ if (job.created != null) {
57
+ const date = new Date(job.created)
58
+ return new Intl.DateTimeFormat('en-US', {
59
+ dateStyle: "medium"
60
+ }).format(date)
61
+ } else {
62
+ return ''
63
+ }
64
+ },
65
salary() {
66
const j = this.job
67
if (j.salary_max != null && j.salary_min != null) {
0 commit comments