Skip to content

Commit b255098

Browse files
author
pipeline
committed
v28.2.5 is released
1 parent ec9d091 commit b255098

File tree

287 files changed

+7657
-3580
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

287 files changed

+7657
-3580
lines changed

controls/barcodegenerator/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 28.2.4 (2025-02-04)
5+
## 28.2.5 (2025-02-11)
66

77
### Barcode
88

controls/base/CHANGELOG.md

+16
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22

33
## [Unreleased]
44

5+
## 28.2.5 (2025-02-11)
6+
7+
### Common
8+
9+
#### Bug Fixes
10+
11+
- `#I664843` - Resolved the issue with `formatDate` method incorrectly calculates the week number.
12+
13+
## 28.2.4 (2025-02-04)
14+
15+
### Common
16+
17+
#### Bug Fixes
18+
19+
- `#I664843` - Resolved the issue with `formatDate` method incorrectly calculates the week number.
20+
521
## 23.2.6 (2023-11-28)
622

723
### Common

controls/base/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-base",
3-
"version": "18.92.0",
3+
"version": "28.2.3",
44
"description": "A common package of Essential JS 2 base libraries, methods and class definitions",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

controls/base/releasenotes/README.md

-183
This file was deleted.

controls/base/spec/intl/date-formatter.spec.ts

+16-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import { DateFormat } from '../../src/intl/date-formatter';
55
import { DateParser } from '../../src/intl/date-parser';
66
import { dateMatched, dupCulObject } from './date-parser.spec';
7-
import { loadCldr, cldrData } from '../../src/internationalization';
7+
import { loadCldr, cldrData, Internationalization } from '../../src/internationalization';
88
import { ParserBase } from '../../src/intl/parser-base';
99
import {HijriParser} from '../../src/hijri-parser';
1010
loadCldr(dupCulObject, {});
@@ -619,4 +619,19 @@ describe('dateformat', () => {
619619
expect(iFormatter).not.toBe('16/Jul/2015 09:33:37 023');
620620
});
621621
});
622+
describe('Week of Year Calculation with Cultural Considerations', () => {
623+
it('calculates week number correctly for Dec 15, 2024, with en-US convention (starting Sunday)', () => {
624+
const date = new Date(2024, 11, 15); // December 15, 2024
625+
let globalize = new Internationalization('en-US');
626+
const result = globalize.formatDate(date, { format: 'WW yyyy', type: 'dateTime', skeleton: 'yMd' }); // First day of week is Sunday
627+
expect(result).toBe('51 2024');
628+
});
629+
630+
it('calculates week number correctly for Dec 15, 2024, with fr-CH convention (starting Monday)', () => {
631+
const date = new Date(2024, 11, 15); // December 15, 2024
632+
let globalize = new Internationalization('fr-CH');
633+
const result = globalize.formatDate(date, { format: 'WW yyyy', type: 'dateTime', skeleton: 'yMd' }); // First day of week is Sunday
634+
expect(result).toBe('51 2024');
635+
});
636+
});
622637
})

controls/base/spec/intl/date-parser.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ describe('DateParser', () => {
891891
});
892892
it('year only format input returns correct year value',()=>{
893893
let tFormatter: Date = DateParser.dateParser('en', { format:'yy',calendar:'islamic' }, cldrData)('40');
894-
let iFormatter: Date = DateParser.dateParser('en', { format:'y',calendar:'islamic' }, cldrData)('1445');
894+
let iFormatter: Date = DateParser.dateParser('en', { format:'y',calendar:'islamic' }, cldrData)('1444');
895895
expect(iFormatter.getFullYear()).toBe(2023);
896896
});
897897
it('full skeletom eleton returns proper value',()=>{

controls/base/src/intl/date-formatter.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export interface FormatOptions {
2626
dateSeperator?: string;
2727
isIslamic?: boolean;
2828
weekOfYear?: string;
29+
firstDayOfWeek?: number;
2930
}
3031
const timeSetter: Object = {
3132
m: 'getMinutes',
@@ -74,6 +75,7 @@ export class DateFormat {
7475
const numObject: Object = getValue('parserObject.numbers', dependable);
7576
const dateObject: Object = dependable.dateObject;
7677
const formatOptions: FormatOptions = { isIslamic: base.islamicRegex.test(option.calendar) };
78+
formatOptions.firstDayOfWeek = base.getWeekData(culture, cldr);
7779
if (isBlazor() && option.isServerRendered) {
7880
option = base.compareBlazorDateFormats(option, culture);
7981
}
@@ -249,7 +251,7 @@ export class DateFormat {
249251
break;
250252
case 'W':
251253
isNumber = true;
252-
curval = base.getWeekOfYear(value);
254+
curval = base.getWeekOfYear(value, options.firstDayOfWeek);
253255
break;
254256
default:
255257
ret += match;

controls/base/src/intl/intl-base.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -1249,25 +1249,26 @@ export namespace IntlBase {
12491249
/**
12501250
* @private
12511251
* @param {Date} date ?
1252+
* @param {number} firstDayOfWeek ?
12521253
* @returns {number} ?
12531254
*/
1254-
export function getWeekOfYear(date: Date): number {
1255+
export function getWeekOfYear(date: Date, firstDayOfWeek: number): number {
12551256
const newYear: Date = new Date(date.getFullYear(), 0, 1);
12561257
let day: number = newYear.getDay();
12571258
let weeknum: number;
12581259
day = (day >= 0 ? day : day + 7);
12591260
const daynum: number = Math.floor((date.getTime() - newYear.getTime() -
12601261
(date.getTimezoneOffset() - newYear.getTimezoneOffset()) * 60000) / 86400000) + 1;
12611262
if (day < 4) {
1262-
weeknum = Math.floor((daynum + day - 1) / 7) + 1;
1263+
weeknum = Math.floor((daynum + day - firstDayOfWeek - 1) / 7) + 1;
12631264
if (weeknum > 52) {
12641265
const nYear: Date = new Date(date.getFullYear() + 1, 0, 1);
12651266
let nday: number = nYear.getDay();
12661267
nday = nday >= 0 ? nday : nday + 7;
12671268
weeknum = nday < 4 ? 1 : 53;
12681269
}
12691270
} else {
1270-
weeknum = Math.floor((daynum + day - 1) / 7);
1271+
weeknum = Math.floor((daynum + day - firstDayOfWeek - 1) / 7);
12711272
}
12721273
return weeknum;
12731274
}

controls/base/styles/definition/_tailwind3.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ $warning-shadow-focus: 0 0 0 4px rgba($warning-shadow, .5) !default;
11641164
$keyboard-focus-shadow: inset 0 0 0 1px $shadow-color, inset 0 0 0 2px $shadow-color1 !default;
11651165

11661166
// fontfamily
1167-
$font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', arial, 'Noto Sans', 'Liberation Sans', sans-serif, 'apple color emoji', 'Segoe UI emoji', 'Segoe UI Symbol', 'Noto color emoji' !default;
1167+
$font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', arial, 'Noto Sans', 'Liberation Sans', sans-serif, 'apple color emoji', 'Segoe UI emoji', 'Segoe UI Symbol', 'Noto color emoji' !default;
11681168

11691169
// default font Size
11701170
$text-xxs: 10px !default;

controls/buttons/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 28.2.4 (2025-02-04)
5+
## 28.2.5 (2025-02-11)
66

77
### Switch
88

controls/calendars/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 28.2.4 (2025-02-04)
5+
## 28.2.5 (2025-02-11)
66

77
### DatePicker
88

controls/charts/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
## [Unreleased]
44

5+
## 28.2.5 (2025-02-11)
6+
7+
### Chart
8+
9+
#### Bug Fixes
10+
11+
- `#I687354` - The chart with the primary and secondary axes is now working properly even when no series is bound.
12+
513
## 28.2.4 (2025-02-04)
614

715
### Chart

controls/charts/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-charts",
3-
"version": "28.2.3",
3+
"version": "28.2.4",
44
"description": "Feature-rich chart control with built-in support for over 25 chart types, technical indictors, trendline, zooming, tooltip, selection, crosshair and trackball.",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

controls/charts/spec/chart/axis/multiple-labels.spec.ts

-4
Original file line numberDiff line numberDiff line change
@@ -1500,10 +1500,6 @@ describe('Chart Control', () => {
15001500
expect(svg !== null).toBe(true);
15011501
svg = document.getElementById('container_BorderLine_9');
15021502
expect(svg !== null).toBe(true);
1503-
svg = document.getElementById('container_BorderLine_10');
1504-
expect(svg !== null).toBe(true);
1505-
svg = document.getElementById('container_BorderLine_11');
1506-
expect(svg !== null).toBe(true);
15071503
done();
15081504
};
15091505
chartObj.loaded = loaded;

0 commit comments

Comments
 (0)