Fix inaccurate age calculation (#1237)

This commit is contained in:
peolic 2021-03-30 06:25:56 +03:00 committed by GitHub
parent 7acae34ed4
commit 496900df42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -28,4 +28,4 @@
* Fix SQL error when filtering galleries excluding performers or tags.
* Fix version checking for armv7 and arm64.
* Change "Is NULL" filter to include empty string values.
* Prevent scene card previews playing in full-screen on iOS devices.
* Prevent scene card previews playing in full-screen on iOS devices.

View File

@ -1,2 +1,3 @@
### 🎨 Improvements
* Fix incorrect performer age calculation in UI.
* Change performer text query to search by name and alias only.

View File

@ -79,7 +79,7 @@ const getAge = (dateString?: string | null, fromDateString?: string) => {
if (
birthdate.getMonth() > fromDate.getMonth() ||
(birthdate.getMonth() >= fromDate.getMonth() &&
birthdate.getDay() > fromDate.getDay())
birthdate.getDate() > fromDate.getDate())
) {
age -= 1;
}