forked from Ivasoft/geovisio-website
Merge branch 'feat/add-upload-date-sequence' into 'develop'
feat: patch date format Closes #32 See merge request geovisio/website!90
This commit is contained in:
@@ -103,7 +103,7 @@ describe('Template', () => {
|
||||
spyPicture.mockReturnValue({ data: {} })
|
||||
const sequenceTitle = `Séquence du ${formatDate(
|
||||
new Date(),
|
||||
'Do MMMM YYYY, hh:mm:ss'
|
||||
'Do MMMM YYYY, HH:mm:ss'
|
||||
)}`
|
||||
const body = new FormData()
|
||||
body.append('position', '1')
|
||||
|
||||
@@ -3,7 +3,7 @@ import 'moment/dist/locale/fr'
|
||||
|
||||
function formatDate(date: Date, formatType: string): string {
|
||||
const formatDate = moment(date)
|
||||
return formatDate.locale('fr').format(formatType)
|
||||
return formatDate.locale(window.navigator.language).format(formatType)
|
||||
}
|
||||
|
||||
function durationCalc(duration1: Date, duration2: Date, type: string): number {
|
||||
|
||||
@@ -62,7 +62,9 @@
|
||||
<div class="wrapper-info-top">
|
||||
<span v-if="sequence.created"
|
||||
>{{ $t('pages.sequence.created') }}
|
||||
{{ formatDate(new Date(sequence.created), 'Do MMMM YY') }}</span
|
||||
{{
|
||||
formatDate(new Date(sequence.created), 'Do MMMM YYYY')
|
||||
}}</span
|
||||
>
|
||||
<span v-if="sequence.duration"
|
||||
>{{ $t('pages.sequence.duration') }}
|
||||
@@ -70,7 +72,7 @@
|
||||
>
|
||||
<span v-if="sequence.taken"
|
||||
>{{ $t('pages.sequence.taken') }}
|
||||
{{ formatDate(sequence.taken, 'Do MMMM YY') }}</span
|
||||
{{ formatDate(sequence.taken, 'Do MMMM YYYY') }}</span
|
||||
>
|
||||
</div>
|
||||
<div class="wrapper-info-top">
|
||||
@@ -79,7 +81,7 @@
|
||||
{{
|
||||
formatDate(
|
||||
sequence.extent.temporal.interval[0][0],
|
||||
'Do MMMM YY, hh:mm:ss'
|
||||
'Do MMMM YYYY, HH:mm:ss'
|
||||
)
|
||||
}}</span
|
||||
>
|
||||
@@ -88,7 +90,7 @@
|
||||
{{
|
||||
formatDate(
|
||||
sequence.extent.temporal.interval[0][1],
|
||||
'Do MMMM YY, hh:mm:ss'
|
||||
'Do MMMM YYYY, HH:mm:ss'
|
||||
)
|
||||
}}</span
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user