|
@@ -1,4 +1,4 @@
|
|
|
-import { stringIsBlank } from '@/utils/blank-utils'
|
|
|
+import {stringIsBlank} from '@/utils/blank-utils'
|
|
|
import moment from 'moment'
|
|
|
|
|
|
export function getDate() {
|
|
@@ -115,7 +115,7 @@ export function getDateRangeFormatDate(data) {
|
|
|
if (typeof data[0].$d !== 'undefined') {
|
|
|
startTime = formatDate(data[0].$d) + ' 00:00:00'
|
|
|
endTime = formatDate(data[1].$d) + ' 23:59:59'
|
|
|
- } else if (data !== null) {
|
|
|
+ } else {
|
|
|
startTime = formatDate(data[0]) + ' 00:00:00'
|
|
|
endTime = formatDate(data[1]) + ' 23:59:59'
|
|
|
}
|
|
@@ -142,8 +142,7 @@ export function formatYear(date) {
|
|
|
if (typeof date === 'undefined') return null
|
|
|
if (date === '' || date === null) return null
|
|
|
if (typeof date === 'string') return date
|
|
|
- const year = date.getFullYear()
|
|
|
- return year
|
|
|
+ return date.getFullYear()
|
|
|
}
|
|
|
|
|
|
export function formatMonth(date) {
|