const that = this ;
const inputMonth = String ( that. query. practicalEndTime) ;
const [ year, month] = inputMonth. split ( '-' ) ;
const currentDate = new Date ( year, parseInt ( month) - 1 , 1 ) ;
const firstDayOfMonth = new Date ( currentDate. getFullYear ( ) , currentDate. getMonth ( ) , 1 ) ;
const lastDayOfMonth = new Date ( currentDate. getFullYear ( ) , currentDate. getMonth ( ) + 1 , 1 ) ;
lastDayOfMonth. setDate ( lastDayOfMonth. getDate ( ) - 1 ) ;
const formattedFirstDay = ` ${ firstDayOfMonth. getFullYear ( ) } . ${ ( firstDayOfMonth. getMonth ( ) + 1 ) . toString ( ) . padStart ( 2 , '0' ) } . ${ firstDayOfMonth. getDate ( ) . toString ( ) . padStart ( 2 , '0' ) } ` ;
const formattedLastDay = ` ${ lastDayOfMonth. getFullYear ( ) } . ${ ( lastDayOfMonth. getMonth ( ) + 1 ) . toString ( ) . padStart ( 2 , '0' ) } . ${ lastDayOfMonth. getDate ( ) . toString ( ) . padStart ( 2 , '0' ) } ` ;
console. log ( "月初日期:" , formattedFirstDay) ;
console. log ( "月末日期:" , formattedLastDay) ;