Gets a date object 30 days ago from today.
()
| 43 | |
| 44 | /** Gets a date object 30 days ago from today. */ |
| 45 | function getThirtyDaysAgoDate() { |
| 46 | const date = new Date(); |
| 47 | // Set the hours, minutes and seconds to 0 to only consider date. |
| 48 | date.setHours(0, 0, 0, 0); |
| 49 | // Set the date to 30 days in the past. |
| 50 | date.setDate(date.getDate() - 30); |
| 51 | return date.getTime(); |
| 52 | } |
| 53 | |
| 54 | /** yargs command module for discovering new conflicts for a PR */ |
| 55 | export const DiscoverNewConflictsCommandModule: CommandModule<{}, DiscoverNewConflictsOptions> = { |