Thomas Kaul
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
10 additions and
4 deletions
-
CHANGELOG.md
-
libs/common/src/lib/validator-constraints/is-after-1970.ts
-
package.json
|
@ -12,6 +12,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
- Fixed the currency conversion for fees and values in the dividend import by applying the correct rate based on the activity date |
|
|
- Fixed the currency conversion for fees and values in the dividend import by applying the correct rate based on the activity date |
|
|
- Fixed the currency conversion for fees and values in the activities service by applying the correct rate based on the activity date |
|
|
- Fixed the currency conversion for fees and values in the activities service by applying the correct rate based on the activity date |
|
|
|
|
|
|
|
|
|
|
|
## 2.104.1 - 2024-08-17 |
|
|
|
|
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
|
|
|
|
- Fixed an issue with the clone functionality of an activity caused by a changed date format |
|
|
|
|
|
|
|
|
## 2.104.0 - 2024-08-17 |
|
|
## 2.104.0 - 2024-08-17 |
|
|
|
|
|
|
|
|
### Added |
|
|
### Added |
|
|
|
@ -2,7 +2,7 @@ import { |
|
|
ValidatorConstraint, |
|
|
ValidatorConstraint, |
|
|
ValidatorConstraintInterface |
|
|
ValidatorConstraintInterface |
|
|
} from 'class-validator'; |
|
|
} from 'class-validator'; |
|
|
import { format, isAfter, parseISO } from 'date-fns'; |
|
|
import { format, isAfter } from 'date-fns'; |
|
|
|
|
|
|
|
|
@ValidatorConstraint({ name: 'isAfter1970' }) |
|
|
@ValidatorConstraint({ name: 'isAfter1970' }) |
|
|
export class IsAfter1970Constraint implements ValidatorConstraintInterface { |
|
|
export class IsAfter1970Constraint implements ValidatorConstraintInterface { |
|
@ -10,7 +10,7 @@ export class IsAfter1970Constraint implements ValidatorConstraintInterface { |
|
|
return `date must be after ${format(new Date(0), 'yyyy')}`; |
|
|
return `date must be after ${format(new Date(0), 'yyyy')}`; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public validate(aDateString: string) { |
|
|
public validate(aDate: Date) { |
|
|
return isAfter(parseISO(aDateString), new Date(0)); |
|
|
return isAfter(aDate, new Date(0)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
@ -1,6 +1,6 @@ |
|
|
{ |
|
|
{ |
|
|
"name": "ghostfolio", |
|
|
"name": "ghostfolio", |
|
|
"version": "2.104.0", |
|
|
"version": "2.104.1", |
|
|
"homepage": "https://ghostfol.io", |
|
|
"homepage": "https://ghostfol.io", |
|
|
"license": "AGPL-3.0", |
|
|
"license": "AGPL-3.0", |
|
|
"repository": "https://github.com/ghostfolio/ghostfolio", |
|
|
"repository": "https://github.com/ghostfolio/ghostfolio", |
|
|