| | |
| | | let minutes = ' ' |
| | | let seconds = ' ' |
| | | if (data != null) { |
| | | year = data.getFullYear() |
| | | months = (data.getMonth() + 1).toString().padStart(2, '0') |
| | | days = data.getDate() |
| | | hours = (data.getHours() + 1).toString().padStart(2, '0') |
| | | minutes = (data.getMinutes() + 1).toString().padStart(2, '0') |
| | | seconds = (data.getSeconds() + 1).toString().padStart(2, '0') |
| | | const dateObject = new Date(data); |
| | | year = dateObject.getFullYear() |
| | | months = (dateObject.getMonth() + 1).toString().padStart(2, '0') |
| | | days = dateObject.getDate() |
| | | hours = (dateObject.getHours() + 1).toString().padStart(2, '0') |
| | | minutes = (dateObject.getMinutes() + 1).toString().padStart(2, '0') |
| | | seconds = (dateObject.getSeconds() + 1).toString().padStart(2, '0') |
| | | } |
| | | return format.replace('YYYY', year).replace('MM', months).replace('DD', days).replace('hh', hours).replace('mm', minutes).replace('ss', seconds); |
| | | }) |