diff --git a/Display/package-lock.json b/Display/package-lock.json
index ee501d3..16d717f 100644
--- a/Display/package-lock.json
+++ b/Display/package-lock.json
@@ -1972,6 +1972,11 @@
"integrity": "sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA==",
"dev": true
},
+ "@types/suncalc": {
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/@types/suncalc/-/suncalc-1.8.0.tgz",
+ "integrity": "sha512-1Bx7KgoCLP8LuKaY9whWiX0Y8JMEB9gmZHNJigainwFuv3gEkZvTx0AGNvnA5nSu1daQcJDKScm9tNpW/ZjpjA=="
+ },
"@types/webpack-sources": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-0.1.5.tgz",
@@ -7889,6 +7894,14 @@
"integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==",
"dev": true
},
+ "ngx-moment": {
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/ngx-moment/-/ngx-moment-3.4.0.tgz",
+ "integrity": "sha512-GEqzSsu12VsXXP35aerlQpuZ1ienEYQZxHmp+RH7EuJD7hWamKgLOpmbiDI9Ij3KLW/UApvonYzZvyRSv3ea/w==",
+ "requires": {
+ "tslib": "^1.9.0"
+ }
+ },
"ngx-socket-io": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/ngx-socket-io/-/ngx-socket-io-3.0.1.tgz",
@@ -10827,6 +10840,11 @@
"when": "~3.6.x"
}
},
+ "suncalc": {
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/suncalc/-/suncalc-1.8.0.tgz",
+ "integrity": "sha1-HZiYEJVjB4dQ9JlKlZ5lTYdqy/U="
+ },
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
diff --git a/Display/package.json b/Display/package.json
index a9db38c..1cef08a 100644
--- a/Display/package.json
+++ b/Display/package.json
@@ -24,14 +24,17 @@
"@angular/router": "~8.2.4",
"@aspnet/signalr": "^1.1.4",
"@types/regression": "^2.0.0",
+ "@types/suncalc": "^1.8.0",
"angular-gridster2": "^8.2.0",
"angular-highcharts": "^8.0.3",
"hammerjs": "^2.0.8",
"highcharts": "^7.2.0",
"moment": "^2.24.0",
+ "ngx-moment": "^3.4.0",
"ngx-socket-io": "^3.0.1",
"regression": "^2.0.1",
"rxjs": "~6.4.0",
+ "suncalc": "^1.8.0",
"tslib": "^1.10.0",
"zone.js": "~0.9.1"
},
diff --git a/Display/src/app/app.module.ts b/Display/src/app/app.module.ts
index 9d1af00..0f02331 100644
--- a/Display/src/app/app.module.ts
+++ b/Display/src/app/app.module.ts
@@ -12,6 +12,7 @@ import { LayoutModule } from '@angular/cdk/layout';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatListModule } from '@angular/material/list';
import { MatMomentDateModule } from '@angular/material-moment-adapter';
+import { MomentModule } from 'ngx-moment';
import { SocketIoModule, SocketIoConfig } from 'ngx-socket-io';
import { GridsterModule } from 'angular-gridster2';
@@ -21,6 +22,7 @@ import { DashboardComponent } from './components/dashboard/dashboard.component';
import { WeatherChartsComponent } from './components/weather/charts/weather-charts.component';
import { WeatherCurrentComponent } from './components/weather/current/weather-current.component';
import { PressureTrendComponent } from './components/weather/pressure-trend/pressure-trend.component';
+import { AlmanacComponent } from './components/weather/almanac/almanac.component';
const config: SocketIoConfig = { url: '/api/laundry', options: {} };
@@ -32,7 +34,8 @@ const config: SocketIoConfig = { url: '/api/laundry', options: {} };
DashboardComponent,
WeatherChartsComponent,
WeatherCurrentComponent,
- PressureTrendComponent
+ PressureTrendComponent,
+ AlmanacComponent
],
imports: [
BrowserModule,
@@ -56,7 +59,8 @@ const config: SocketIoConfig = { url: '/api/laundry', options: {} };
ReactiveFormsModule,
MatMomentDateModule,
MatProgressSpinnerModule,
- GridsterModule
+ GridsterModule,
+ MomentModule
],
providers: [],
bootstrap: [AppComponent]
diff --git a/Display/src/app/components/dashboard/dashboard.component.html b/Display/src/app/components/dashboard/dashboard.component.html
index 0c68db3..2b0c486 100644
--- a/Display/src/app/components/dashboard/dashboard.component.html
+++ b/Display/src/app/components/dashboard/dashboard.component.html
@@ -40,5 +40,15 @@
+
| + Sunrise + | ++ {{ sun.sunrise | amLocal | amDateFormat: 'hh:mm:ss A' }} + | +
| + Sunset + | ++ {{ sun.sunset | amLocal | amDateFormat: 'hh:mm:ss A' }} + | +
| + Moon + | ++ {{ moonPhaseName(moon.phase) }} - {{ (moon.fraction * 100).toFixed(0) }}% illuminated + | +