AW-3477 fmHasPackage check werkt niet correct voor vandaag
This commit is contained in:
parent
66e492d2f8
commit
b191751e02
20
package-lock.json
generated
20
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "farmmaps-lib-app",
|
"name": "farmmaps-lib-app",
|
||||||
"version": "1.1.1",
|
"version": "1.1.13",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -4079,25 +4079,25 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@farmmaps/common": {
|
"@farmmaps/common": {
|
||||||
"version": "1.1.1-prerelease.2031",
|
"version": "1.1.12",
|
||||||
"resolved": "https://repository.akkerweb.nl/repository/npm-group/@farmmaps/common/-/common-1.1.1-prerelease.2031.tgz",
|
"resolved": "https://repository.akkerweb.nl/repository/npm-group/@farmmaps/common/-/common-1.1.12.tgz",
|
||||||
"integrity": "sha512-lSmTd2D1/PqzaXBjjY4X6UTYA5joZndXyZpUkFNm/Z0TTFmzFKmiIyGRA9AHX4StdQXC7QsCNfalYN31tnwtuQ==",
|
"integrity": "sha512-TqPyPv35wK4bM1D/ZnT7zmno12pIlmBVesMKMJF7VtddZUm9mZe890ZQv7JJrbgURhU1o4mBs2ytmW0dGhDArw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"tslib": "^2.0.0"
|
"tslib": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@farmmaps/common-map": {
|
"@farmmaps/common-map": {
|
||||||
"version": "1.1.1-prerelease.2031",
|
"version": "1.1.12",
|
||||||
"resolved": "https://repository.akkerweb.nl/repository/npm-group/@farmmaps/common-map/-/common-map-1.1.1-prerelease.2031.tgz",
|
"resolved": "https://repository.akkerweb.nl/repository/npm-group/@farmmaps/common-map/-/common-map-1.1.12.tgz",
|
||||||
"integrity": "sha512-BQ2bvNohPth0+oxoSoh+WWLJ/mP2CGW4Qf4xqgC3tgfW+UZfD0dBPl7IT2piuvOuUQzlSVloinCJ4ciZGyZRXg==",
|
"integrity": "sha512-mu2AaIrGEbfj7gzJZLwLwBawOWwz4cJXDxcrsZQRzTb8Z9BA3ZV+9w1XkGU7Q0CgYLPuGaWMFF6AHqzTPARj/g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"tslib": "^2.0.0"
|
"tslib": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@farmmaps/common-map3d": {
|
"@farmmaps/common-map3d": {
|
||||||
"version": "1.1.1-prerelease.2031",
|
"version": "1.1.12",
|
||||||
"resolved": "https://repository.akkerweb.nl/repository/npm-group/@farmmaps/common-map3d/-/common-map3d-1.1.1-prerelease.2031.tgz",
|
"resolved": "https://repository.akkerweb.nl/repository/npm-group/@farmmaps/common-map3d/-/common-map3d-1.1.12.tgz",
|
||||||
"integrity": "sha512-2M5wv5sFwlVwPGlN1b1AGM3Dh/DJFS7+L3b6e6ir2+ASoyy7xhZ67IWS2du8B7y7/xVsgxCJcJp1EJezbSCMAA==",
|
"integrity": "sha512-yHRrL97GQZj0m4AlhsNrnKL6aujCBr5qgbp7uiUqsSQXp2dpJXbUFZpPnPKvOrFDUNJl8gqsbo5cvsvHucqCYg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"tslib": "^2.0.0"
|
"tslib": "^2.0.0"
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "farmmaps-lib-app",
|
"name": "farmmaps-lib-app",
|
||||||
"version": "1.1.12",
|
"version": "1.1.13",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
@ -19,9 +19,9 @@
|
|||||||
"@angular/platform-browser": "~11.2.14",
|
"@angular/platform-browser": "~11.2.14",
|
||||||
"@angular/platform-browser-dynamic": "~11.2.14",
|
"@angular/platform-browser-dynamic": "~11.2.14",
|
||||||
"@angular/router": "~11.2.14",
|
"@angular/router": "~11.2.14",
|
||||||
"@farmmaps/common": "1.1.4",
|
"@farmmaps/common": "1.1.12",
|
||||||
"@farmmaps/common-map": "1.1.4",
|
"@farmmaps/common-map": "1.1.12",
|
||||||
"@farmmaps/common-map3d": "1.1.4",
|
"@farmmaps/common-map3d": "1.1.12",
|
||||||
"@microsoft/signalr": "^3.1.16",
|
"@microsoft/signalr": "^3.1.16",
|
||||||
"@ng-bootstrap/ng-bootstrap": "^9.0",
|
"@ng-bootstrap/ng-bootstrap": "^9.0",
|
||||||
"@ngrx/effects": "^11.0",
|
"@ngrx/effects": "^11.0",
|
||||||
|
@ -51,7 +51,8 @@ export function getValidPackages(packageMap: IPackages): {[key: string]: IPackag
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function isValidPackage(pack: IPackage): boolean {
|
export function isValidPackage(pack: IPackage): boolean {
|
||||||
const today = new Date(new Date(Date.now()).toUTCString()).setHours(0, 0, 0, 0);
|
const now = new Date(Date.now());
|
||||||
return pack !== null && new Date(pack.dataDate).getTime() <= today
|
const utcToday = Date.UTC(now.getUTCFullYear(),now.getUTCMonth(),now.getUTCDate());
|
||||||
&& (!pack.dataEndDate || new Date(pack.dataEndDate).getTime() >= today);
|
return pack !== null && new Date(pack.dataDate).getTime() <= utcToday
|
||||||
|
&& (!pack.dataEndDate || new Date(pack.dataEndDate).getTime() >= utcToday);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user