Skip to content

Commit

Permalink
v28.2.5 is released
Browse files Browse the repository at this point in the history
  • Loading branch information
pipeline committed Feb 11, 2025
1 parent ec9d091 commit b255098
Show file tree
Hide file tree
Showing 287 changed files with 7,657 additions and 3,580 deletions.
2 changes: 1 addition & 1 deletion controls/barcodegenerator/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## [Unreleased]

## 28.2.4 (2025-02-04)
## 28.2.5 (2025-02-11)

### Barcode

Expand Down
16 changes: 16 additions & 0 deletions controls/base/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

## [Unreleased]

## 28.2.5 (2025-02-11)

### Common

#### Bug Fixes

- `#I664843` - Resolved the issue with `formatDate` method incorrectly calculates the week number.

## 28.2.4 (2025-02-04)

### Common

#### Bug Fixes

- `#I664843` - Resolved the issue with `formatDate` method incorrectly calculates the week number.

## 23.2.6 (2023-11-28)

### Common
Expand Down
2 changes: 1 addition & 1 deletion controls/base/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@syncfusion/ej2-base",
"version": "18.92.0",
"version": "28.2.3",
"description": "A common package of Essential JS 2 base libraries, methods and class definitions",
"author": "Syncfusion Inc.",
"license": "SEE LICENSE IN license",
Expand Down
183 changes: 0 additions & 183 deletions controls/base/releasenotes/README.md

This file was deleted.

17 changes: 16 additions & 1 deletion controls/base/spec/intl/date-formatter.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { DateFormat } from '../../src/intl/date-formatter';
import { DateParser } from '../../src/intl/date-parser';
import { dateMatched, dupCulObject } from './date-parser.spec';
import { loadCldr, cldrData } from '../../src/internationalization';
import { loadCldr, cldrData, Internationalization } from '../../src/internationalization';
import { ParserBase } from '../../src/intl/parser-base';
import {HijriParser} from '../../src/hijri-parser';
loadCldr(dupCulObject, {});
Expand Down Expand Up @@ -619,4 +619,19 @@ describe('dateformat', () => {
expect(iFormatter).not.toBe('16/Jul/2015 09:33:37 023');
});
});
describe('Week of Year Calculation with Cultural Considerations', () => {
it('calculates week number correctly for Dec 15, 2024, with en-US convention (starting Sunday)', () => {
const date = new Date(2024, 11, 15); // December 15, 2024
let globalize = new Internationalization('en-US');
const result = globalize.formatDate(date, { format: 'WW yyyy', type: 'dateTime', skeleton: 'yMd' }); // First day of week is Sunday
expect(result).toBe('51 2024');
});

it('calculates week number correctly for Dec 15, 2024, with fr-CH convention (starting Monday)', () => {
const date = new Date(2024, 11, 15); // December 15, 2024
let globalize = new Internationalization('fr-CH');
const result = globalize.formatDate(date, { format: 'WW yyyy', type: 'dateTime', skeleton: 'yMd' }); // First day of week is Sunday
expect(result).toBe('51 2024');
});
});
})
2 changes: 1 addition & 1 deletion controls/base/spec/intl/date-parser.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ describe('DateParser', () => {
});
it('year only format input returns correct year value',()=>{
let tFormatter: Date = DateParser.dateParser('en', { format:'yy',calendar:'islamic' }, cldrData)('40');
let iFormatter: Date = DateParser.dateParser('en', { format:'y',calendar:'islamic' }, cldrData)('1445');
let iFormatter: Date = DateParser.dateParser('en', { format:'y',calendar:'islamic' }, cldrData)('1444');
expect(iFormatter.getFullYear()).toBe(2023);
});
it('full skeletom eleton returns proper value',()=>{
Expand Down
4 changes: 3 additions & 1 deletion controls/base/src/intl/date-formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export interface FormatOptions {
dateSeperator?: string;
isIslamic?: boolean;
weekOfYear?: string;
firstDayOfWeek?: number;
}
const timeSetter: Object = {
m: 'getMinutes',
Expand Down Expand Up @@ -74,6 +75,7 @@ export class DateFormat {
const numObject: Object = getValue('parserObject.numbers', dependable);
const dateObject: Object = dependable.dateObject;
const formatOptions: FormatOptions = { isIslamic: base.islamicRegex.test(option.calendar) };
formatOptions.firstDayOfWeek = base.getWeekData(culture, cldr);
if (isBlazor() && option.isServerRendered) {
option = base.compareBlazorDateFormats(option, culture);
}
Expand Down Expand Up @@ -249,7 +251,7 @@ export class DateFormat {
break;
case 'W':
isNumber = true;
curval = base.getWeekOfYear(value);
curval = base.getWeekOfYear(value, options.firstDayOfWeek);
break;
default:
ret += match;
Expand Down
7 changes: 4 additions & 3 deletions controls/base/src/intl/intl-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1249,25 +1249,26 @@ export namespace IntlBase {
/**
* @private
* @param {Date} date ?
* @param {number} firstDayOfWeek ?
* @returns {number} ?
*/
export function getWeekOfYear(date: Date): number {
export function getWeekOfYear(date: Date, firstDayOfWeek: number): number {
const newYear: Date = new Date(date.getFullYear(), 0, 1);
let day: number = newYear.getDay();
let weeknum: number;
day = (day >= 0 ? day : day + 7);
const daynum: number = Math.floor((date.getTime() - newYear.getTime() -
(date.getTimezoneOffset() - newYear.getTimezoneOffset()) * 60000) / 86400000) + 1;
if (day < 4) {
weeknum = Math.floor((daynum + day - 1) / 7) + 1;
weeknum = Math.floor((daynum + day - firstDayOfWeek - 1) / 7) + 1;
if (weeknum > 52) {
const nYear: Date = new Date(date.getFullYear() + 1, 0, 1);
let nday: number = nYear.getDay();
nday = nday >= 0 ? nday : nday + 7;
weeknum = nday < 4 ? 1 : 53;
}
} else {
weeknum = Math.floor((daynum + day - 1) / 7);
weeknum = Math.floor((daynum + day - firstDayOfWeek - 1) / 7);
}
return weeknum;
}
Expand Down
2 changes: 1 addition & 1 deletion controls/base/styles/definition/_tailwind3.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ $warning-shadow-focus: 0 0 0 4px rgba($warning-shadow, .5) !default;
$keyboard-focus-shadow: inset 0 0 0 1px $shadow-color, inset 0 0 0 2px $shadow-color1 !default;

// fontfamily
$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;
$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;

// default font Size
$text-xxs: 10px !default;
Expand Down
2 changes: 1 addition & 1 deletion controls/buttons/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## [Unreleased]

## 28.2.4 (2025-02-04)
## 28.2.5 (2025-02-11)

### Switch

Expand Down
2 changes: 1 addition & 1 deletion controls/calendars/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## [Unreleased]

## 28.2.4 (2025-02-04)
## 28.2.5 (2025-02-11)

### DatePicker

Expand Down
8 changes: 8 additions & 0 deletions controls/charts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

## [Unreleased]

## 28.2.5 (2025-02-11)

### Chart

#### Bug Fixes

- `#I687354` - The chart with the primary and secondary axes is now working properly even when no series is bound.

## 28.2.4 (2025-02-04)

### Chart
Expand Down
2 changes: 1 addition & 1 deletion controls/charts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@syncfusion/ej2-charts",
"version": "28.2.3",
"version": "28.2.4",
"description": "Feature-rich chart control with built-in support for over 25 chart types, technical indictors, trendline, zooming, tooltip, selection, crosshair and trackball.",
"author": "Syncfusion Inc.",
"license": "SEE LICENSE IN license",
Expand Down
4 changes: 0 additions & 4 deletions controls/charts/spec/chart/axis/multiple-labels.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1500,10 +1500,6 @@ describe('Chart Control', () => {
expect(svg !== null).toBe(true);
svg = document.getElementById('container_BorderLine_9');
expect(svg !== null).toBe(true);
svg = document.getElementById('container_BorderLine_10');
expect(svg !== null).toBe(true);
svg = document.getElementById('container_BorderLine_11');
expect(svg !== null).toBe(true);
done();
};
chartObj.loaded = loaded;
Expand Down
Loading

0 comments on commit b255098

Please sign in to comment.