Feature/select rate vertical data flow * add fix from SW-2666 * use translations for room packages * move types to it's own file * Merge branch 'master' of bitbucket.org:scandic-swap/web into feature/select-rate-vertical-data-flow * merge * feature/select-rate: double rate for campaing rates * revert NODE_ENV check in Cookiebot script * revert testing values * fix(SW-3171): fix all filter selected in price details * fix(SW-3166): multiroom anchoring when changing filter * fix(SW-3172): check hotelType, show correct breakfast message * Merge branch 'feature/select-rate-vertical-data-flow' of bitbucket.org:scandic-swap/web into feature/select-rate-vertical-data-flow * fix: show special needs icons for subsequent roomTypes SW-3167 * fix: Display strike through text when logged in SW-3168 * fix: Reinstate the scrollToView behaviour when selecting a rate SW-3169 * merge * . * PR fixes * fix: don't return notFound() * . * always include defaults for room packages * merge * merge * merge * Remove floating h1 for new select-rate Approved-by: Anton Gunnarsson
43 lines
1.2 KiB
TypeScript
43 lines
1.2 KiB
TypeScript
import "dayjs/locale/da"
|
|
import "dayjs/locale/de"
|
|
import "dayjs/locale/fi"
|
|
import "dayjs/locale/sv"
|
|
|
|
import d from "dayjs"
|
|
import nb from "dayjs/locale/nb"
|
|
import advancedFormat from "dayjs/plugin/advancedFormat"
|
|
import customParseFormat from "dayjs/plugin/customParseFormat"
|
|
import duration from "dayjs/plugin/duration"
|
|
import isBetween from "dayjs/plugin/isBetween"
|
|
import isSameOrAfter from "dayjs/plugin/isSameOrAfter"
|
|
import isSameOrBefore from "dayjs/plugin/isSameOrBefore"
|
|
import isToday from "dayjs/plugin/isToday"
|
|
import relativeTime from "dayjs/plugin/relativeTime"
|
|
import timezone from "dayjs/plugin/timezone"
|
|
import utc from "dayjs/plugin/utc"
|
|
|
|
/**
|
|
* dayjs export Norwegian as nb [Norwegian Bokmål] so here we create the same
|
|
* setup as nb has.
|
|
* https://day.js.org/docs/en/customization/customization
|
|
* https://github.com/iamkun/dayjs/blob/dev/src/locale/nb.js
|
|
*/
|
|
d.locale("no", { ...nb, name: "no" }, true)
|
|
|
|
/**
|
|
* If more plugins are needed https://day.js.org/docs/en/plugin/plugin
|
|
*/
|
|
d.extend(advancedFormat)
|
|
d.extend(isToday)
|
|
d.extend(relativeTime)
|
|
d.extend(timezone)
|
|
d.extend(utc)
|
|
d.extend(isSameOrAfter)
|
|
d.extend(isSameOrBefore)
|
|
d.extend(duration)
|
|
d.extend(customParseFormat)
|
|
d.extend(isBetween)
|
|
|
|
export const dt = d
|
|
export type Dayjs = d.Dayjs
|