tethys.backend/resources/js/utils/dayjs.ts
Arno Kaimbacher b06ccae603
Some checks failed
CI Pipeline / japa-tests (push) Failing after 1m2s
- added @adonisjs/mail
- mail_settings_controller for setting smtp settings
- added view ror rjecting dataset for editor
- added new model AppConfig for stroing appwide config values
- better validate_chesum.ts command with process chunking
- added vue3 apps 'BasicSettings' like email, profile settings
- started with 2 multilingual capabilities
- npm updates
2024-09-16 17:59:46 +02:00

16 lines
389 B
TypeScript

// src/plugins/dayjs.ts
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
import 'dayjs/locale/de';
import 'dayjs/locale/en';
const extendedDayjs = dayjs.extend(relativeTime);
export const setDayjsLocale = (locale: string) => {
extendedDayjs.locale(locale);
};
// // Set a default locale initially
// setDayjsLocale('en');
export default extendedDayjs;