Skip to content

Commit

Permalink
UPDATE: Fjerne referanse til lang.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulMartinKokseter committed May 27, 2024
1 parent c92a639 commit 00b9a48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions apps/frontend/src/util/date-formatter.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import moment from 'moment'
import { currentLang } from './intl/intl'

export const lastModifiedDate = (lastModifiedDateString: string) => {
return moment(lastModifiedDateString).locale(currentLang().langCode).format('LL')
return moment(lastModifiedDateString).locale('nb').format('LL')
}
3 changes: 1 addition & 2 deletions apps/frontend/src/util/sort.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { intl } from './intl/intl'

const start = (prefix: string) => (text: string) => {
const startIndex = text.indexOf(prefix.toLowerCase())
Expand All @@ -10,5 +9,5 @@ export const prefixBiasedSort: (prefix: string, a: string, b: string) => number
const aLower = a.toLowerCase()
const bLower = b.toLowerCase()
const c1 = comp(aLower) - comp(bLower)
return c1 === 0 ? aLower.localeCompare(bLower, intl.getLanguage()) : c1
return c1 === 0 ? aLower.localeCompare(bLower, 'nb') : c1
}

0 comments on commit 00b9a48

Please sign in to comment.