Skip to content

Commit 70bfbf6

Browse files
authored
Removed moment dependency (#1322)
* Removed moment dependency * Fix playwright install
1 parent a4fe589 commit 70bfbf6

File tree

4 files changed

+5
-18
lines changed

4 files changed

+5
-18
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
path: ~/.cache/ms-playwright
3030
key: playwright-browsers-${{ env.PLAYWRIGHT_VERSION }}
3131

32-
- run: npm playwright install
32+
- run: npx playwright install
3333
if: steps.cache-playwright-browsers.outputs.cache-hit != 'true'
3434

3535
- name: Lint and Test

package-lock.json

Lines changed: 1 addition & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
"@angular/platform-browser-dynamic": "20.1.2",
3737
"@angular/router": "20.1.2",
3838
"lodash-es": "4.17.21",
39-
"moment": "2.30.1",
4039
"normalize.css": "8.0.1",
4140
"rxjs": "7.8.1",
4241
"stream": "0.0.3",

src/database/comics.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import moment from 'moment';
2-
31
import {
42
Comic,
53
} from '../app/models';
@@ -31,12 +29,12 @@ function ComicPrototype(issue: string, datePublished: string, seriesVolumeId: st
3129

3230
this.classes = { fullScreen: false, stickyBottom: false, stickyLeft: false, stickyRight: false, stickyTop: false };
3331
this.containerStyles = { 'left.px': null, 'top.px': null, 'width.px': null };
34-
this.date = moment(year + '-' + month + '-' + day);
32+
this.date = new Date(year + '-' + month + '-' + day + 'T00:00:00Z');
3533
this.id = seriesVolumeId + issue;
3634
this.idSanitized = (seriesVolumeId + issue).replace(/[^a-zA-Z0-9-\s]/g, '');
3735
this.issue = issue;
38-
this.yearPublished = this.date.year();
39-
this.monthPublished = this.date.month() + 1;
36+
this.yearPublished = this.date.getFullYear();
37+
this.monthPublished = this.date.getMonth() + 1;
4038
this.seriesVolumeId = seriesVolumeId;
4139
this.styles = { background: null, color: null, 'marginLeft.px': null, 'marginTop.px': null};
4240
this.titles = titles ? titles : [];

0 commit comments

Comments
 (0)