diff --git a/CHANGELOG.md b/CHANGELOG.md
index 12beb5aa63ab..a482fb73ffd5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,16 @@
+
+# 15.2.7 "paper-pelican" (2023-04-13)
+### material
+| Commit | Type | Description |
+| -- | -- | -- |
+| [de22cdc72](https://github.com/angular/components/commit/de22cdc7227187ad11e385caf0456639cfea1da8) | fix | **table:** correct filterPredicate typo ([#26902](https://github.com/angular/components/pull/26902)) |
+### material-luxon-adapter
+| Commit | Type | Description |
+| -- | -- | -- |
+| [6c00403a8](https://github.com/angular/components/commit/6c00403a874dd3132de6995d4dcd9e4ebf9dfb82) | fix | zone on DateTime ignored ([#26887](https://github.com/angular/components/pull/26887)) |
+
+
+
# 15.2.6 "chiffon-cardigan" (2023-04-05)
### cdk
diff --git a/package.json b/package.json
index 3c72c6d19897..ad1a875eee79 100644
--- a/package.json
+++ b/package.json
@@ -54,7 +54,7 @@
"ci-notify-slack-failure": "ts-node --esm --project scripts/tsconfig.json scripts/circleci/notify-slack-job-failure.mts",
"prepare": "husky install"
},
- "version": "15.2.6",
+ "version": "15.2.7",
"dependencies": {
"@angular/animations": "^15.2.0-rc.0",
"@angular/common": "^15.2.0-rc.0",
diff --git a/src/material-luxon-adapter/adapter/luxon-date-adapter.spec.ts b/src/material-luxon-adapter/adapter/luxon-date-adapter.spec.ts
index 306b5c7aed59..8ee5312d04cf 100644
--- a/src/material-luxon-adapter/adapter/luxon-date-adapter.spec.ts
+++ b/src/material-luxon-adapter/adapter/luxon-date-adapter.spec.ts
@@ -9,7 +9,7 @@
import {LOCALE_ID} from '@angular/core';
import {TestBed, waitForAsync} from '@angular/core/testing';
import {DateAdapter, MAT_DATE_LOCALE} from '@angular/material/core';
-import {DateTime} from 'luxon';
+import {DateTime, FixedOffsetZone, Settings} from 'luxon';
import {LuxonDateModule} from './index';
import {MAT_LUXON_DATE_ADAPTER_OPTIONS} from './luxon-date-adapter';
@@ -351,6 +351,16 @@ describe('LuxonDateAdapter', () => {
expect(date).toEqual('2. jan. 2017');
});
+ it('should format with a different timezone', () => {
+ Settings.defaultZone = FixedOffsetZone.parseSpecifier('UTC-12');
+
+ let date = adapter.format(DateTime.local(2017, JAN, 2, {zone: 'UTC-12'}), 'DD');
+ expect(date).toEqual('Jan 2, 2017');
+
+ date = adapter.format(DateTime.local(2017, JAN, 2, {zone: 'UTC+12'}), 'DD');
+ expect(date).toEqual('Jan 2, 2017');
+ });
+
it('should throw when attempting to format invalid date', () => {
expect(() => adapter.format(DateTime.fromMillis(NaN), 'LL/dd/yyyy')).toThrowError(
/LuxonDateAdapter: Cannot format invalid date\./,
diff --git a/src/material-luxon-adapter/adapter/luxon-date-adapter.ts b/src/material-luxon-adapter/adapter/luxon-date-adapter.ts
index f1a67d916394..663859c3aac1 100644
--- a/src/material-luxon-adapter/adapter/luxon-date-adapter.ts
+++ b/src/material-luxon-adapter/adapter/luxon-date-adapter.ts
@@ -193,10 +193,11 @@ export class LuxonDateAdapter extends DateAdapter {
if (!this.isValid(date)) {
throw Error('LuxonDateAdapter: Cannot format invalid date.');
}
- return date
- .setLocale(this.locale)
- .setZone(this._useUTC ? 'utc' : undefined)
- .toFormat(displayFormat);
+ if (this._useUTC) {
+ return date.setLocale(this.locale).setZone('utc').toFormat(displayFormat);
+ } else {
+ return date.setLocale(this.locale).toFormat(displayFormat);
+ }
}
addCalendarYears(date: LuxonDateTime, years: number): LuxonDateTime {
diff --git a/src/material/legacy-table/table-data-source.ts b/src/material/legacy-table/table-data-source.ts
index f8a2e2cde882..c92f4b360031 100644
--- a/src/material/legacy-table/table-data-source.ts
+++ b/src/material/legacy-table/table-data-source.ts
@@ -14,7 +14,7 @@ import {_MatTableDataSource} from '@angular/material/table';
* sorting (using MatSort), and pagination (using paginator).
*
* Allows for sort customization by overriding sortingDataAccessor, which defines how data
- * properties are accessed. Also allows for filter customization by overriding filterTermAccessor,
+ * properties are accessed. Also allows for filter customization by overriding filterPredicate,
* which defines how row data is converted to a string for filter matching.
*
* **Note:** This class is meant to be a simple data source to help you get started. As such
diff --git a/src/material/table/table-data-source.ts b/src/material/table/table-data-source.ts
index 318eaa83b76b..f6d03924afb6 100644
--- a/src/material/table/table-data-source.ts
+++ b/src/material/table/table-data-source.ts
@@ -310,12 +310,12 @@ export class _MatTableDataSource<
/**
* Returns a filtered data array where each filter object contains the filter string within
- * the result of the filterTermAccessor function. If no filter is set, returns the data array
+ * the result of the filterPredicate function. If no filter is set, returns the data array
* as provided.
*/
_filterData(data: T[]) {
// If there is a filter string, filter out data that does not contain it.
- // Each data object is converted to a string using the function defined by filterTermAccessor.
+ // Each data object is converted to a string using the function defined by filterPredicate.
// May be overridden for customization.
this.filteredData =
this.filter == null || this.filter === ''
@@ -414,7 +414,7 @@ export class _MatTableDataSource<
* sorting (using MatSort), and pagination (using MatPaginator).
*
* Allows for sort customization by overriding sortingDataAccessor, which defines how data
- * properties are accessed. Also allows for filter customization by overriding filterTermAccessor,
+ * properties are accessed. Also allows for filter customization by overriding filterPredicate,
* which defines how row data is converted to a string for filter matching.
*
* **Note:** This class is meant to be a simple data source to help you get started. As such