(date)
| 60 | } |
| 61 | |
| 62 | const getDateTimeFormatted = (date) => { |
| 63 | const now = date ? date : new Date() |
| 64 | const year = now.getFullYear() |
| 65 | const month = (now.getMonth() + 1).toString().padStart(2, '0') // +1 because getMonth() returns 0 for January, 1 for February, etc. |
| 66 | const day = now.getDate().toString().padStart(2, '0') |
| 67 | const hour = now.getHours().toString().padStart(2, '0') |
| 68 | |
| 69 | return `${year}-${month}-${day}-${hour}` |
| 70 | } |
| 71 | |
| 72 | const subtractTime = (months, days, hours) => { |
| 73 | let checkDate = new Date() |
no outgoing calls
no test coverage detected