11
86134
2023-11-09 87c12ba5f907d6c12d9b0b7448ff8cf01c958bc7
src/util/date.js
@@ -84,3 +84,20 @@
  year = (year + '').substring(2, 4)
  return year + month
}
/**
 * 获取年月日
 */
export function getYearAndMonthAndDays() {
  const date = new Date()
  let year = date.getFullYear()
  let month = date.getMonth() + 1
  if (month < 10) {
    month = '0' + month
  } else {
    month = month + '-'
  }
  year = year + '-'
  let days = date.getDate()
  return year + month + days
}