Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 49s

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-11-05 13:08:56 +07:00
commit 802900ee70
3 changed files with 8 additions and 4 deletions

View file

@ -12,7 +12,7 @@ export const load: PageServerLoad = async ({ fetch }) => {
exams.forEach((ex) => {
const { id, title, announcement_startDate } = ex;
const url = '/competitive/' + id;
ex.date = dayjs(announcement_startDate).format('DD MMM YYYY');
ex.date = dayjs(announcement_startDate).add(543, 'year').format('DD MMM YYYY');
ex.image = ex.image ? ex.image : '/images/exam_place_holder.png';
if (!ex.announcementExam) return; //ignore other date for normal post

View file

@ -12,7 +12,7 @@ export const load: PageServerLoad = async ({ fetch }) => {
exams.forEach((ex) => {
const { id, title, announcement_startDate } = ex;
const url = '/qualifying/' + id;
ex.date = dayjs(announcement_startDate).format('DD MMM YYYY');
ex.date = dayjs(announcement_startDate).add(543, 'year').format('DD MMM YYYY');
ex.image = ex.image ? ex.image : '/images/exam_place_holder.png';
if (!ex.announcementExam) return; //ignore other date for normal post

View file

@ -7,8 +7,12 @@
import dayjs from 'dayjs';
import { each } from 'svelte/internal';
function formatDate(start: string, end: string | undefined = undefined) {
if (!end) return dayjs(start).format('DD MMM YYYY');
return dayjs(start).format('DD MMM YYYY') + ' - ' + dayjs(end).format('DD MMM YYYY');
if (!end) return dayjs(start).add(543, 'year').format('DD MMM YYYY');
return (
dayjs(start).add(543, 'year').format('DD MMM YYYY') +
' - ' +
dayjs(end).add(543, 'year').format('DD MMM YYYY')
);
}
function isEndDatePassed(endDate: string | undefined) {
if (endDate) {