more data managing and getting ready and all
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import moment from "moment";
|
||||
const moment = require("moment");
|
||||
|
||||
export function generateGreetings(): string {
|
||||
const hour = moment().hour();
|
||||
@@ -17,3 +17,16 @@ export function generateGreetings(): string {
|
||||
export function getTime(date?: Date) {
|
||||
return date != null ? date.getTime() : 0;
|
||||
}
|
||||
|
||||
const today = new Date();
|
||||
|
||||
const yesterday = today;
|
||||
yesterday.setDate(yesterday.getDate() - 1);
|
||||
|
||||
const Days7Ago = today;
|
||||
Days7Ago.setDate(Days7Ago.getDate() - 7);
|
||||
|
||||
const earlierThisMonth = today;
|
||||
earlierThisMonth.setDate(earlierThisMonth.getDate() - 30);
|
||||
|
||||
export { today, yesterday, Days7Ago, earlierThisMonth };
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"private": false,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^5.10.2",
|
||||
"moment": "^2.29.1",
|
||||
"typescript": "^4.5.5",
|
||||
"uuid": "^8.3.2"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user