From a6c760c3b78d812cbcb6532259850d05c5ca6009 Mon Sep 17 00:00:00 2001 From: Kavehhn174 Date: Sun, 16 Aug 2026 00:16:40 +0330 Subject: [PATCH] =?UTF-8?q?fix(sms):=20prefix=20course=20time=20with=20?= =?UTF-8?q?=D8=B3=D8=A7=D8=B9=D8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SMS courseTime now reads «از ساعت 19 تا 21» instead of «از 19 تا 21». --- utils/classSchedule.js | 2 +- utils/classSchedule.test.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/utils/classSchedule.js b/utils/classSchedule.js index bd03eca..07f1720 100644 --- a/utils/classSchedule.js +++ b/utils/classSchedule.js @@ -24,7 +24,7 @@ const formatCourseTime = (startTime, endTime) => { const end = formatClockPart(endTime); if (!start) return ''; if (!end) return start; - return `از ${start} تا ${end}`; + return `از ساعت ${start} تا ${end}`; }; const weekdayIndex = (value) => { diff --git a/utils/classSchedule.test.js b/utils/classSchedule.test.js index 98efe8d..b069e9e 100644 --- a/utils/classSchedule.test.js +++ b/utils/classSchedule.test.js @@ -14,8 +14,8 @@ const { describe('class schedule SMS helpers', () => { it('formats course time as an hour range', () => { - assert.equal(formatCourseTime('19:00', '21:00'), 'از 19 تا 21'); - assert.equal(formatCourseTime('19:30', '21:00'), 'از 19:30 تا 21'); + assert.equal(formatCourseTime('19:00', '21:00'), 'از ساعت 19 تا 21'); + assert.equal(formatCourseTime('19:30', '21:00'), 'از ساعت 19:30 تا 21'); }); it('joins class weekdays in Persian week order', () => { @@ -47,7 +47,7 @@ describe('class schedule SMS helpers', () => { assert.ok(context.classStartDate); assert.equal(context.classDays, 'شنبه و دوشنبه'); - assert.equal(context.courseTime, 'از 19 تا 21'); + assert.equal(context.courseTime, 'از ساعت 19 تا 21'); }); it('uses the current session for course time when provided', () => { @@ -57,7 +57,7 @@ describe('class schedule SMS helpers', () => { { startTime: '10:00', endTime: '12:00' } ); - assert.equal(context.courseTime, 'از 10 تا 12'); + assert.equal(context.courseTime, 'از ساعت 10 تا 12'); }); it('prefers stored class days and times over inferred sessions', () => { @@ -75,7 +75,7 @@ describe('class schedule SMS helpers', () => { ); assert.equal(context.classDays, 'شنبه و دوشنبه'); - assert.equal(context.courseTime, 'از 18 تا 20'); + assert.equal(context.courseTime, 'از ساعت 18 تا 20'); }); });