name author veaba
 *  date const date = new Date ( ) ; import { format } from 'date-fns' ; const year = date . getFullYear ( ) ; const month = String ( date . getMonth ( ) + 1 ) . padStart ( 2 , '0' ) ; const day = String ( date . getDate ( ) ) . padStart ( 2 , '0' ) ; const lastDay = String ( date . getDate ( ) - 1 ) . padStart ( 2 , '0' ) ; export const today = year + '-' + month + '-' + day ; export const yesterday = year + '-' + month + '-' + lastDay ; export const fmtTime = ( time ) => { if ( typeof time !== 'string' ) { return ' ' ; } const the_time = new Date ( time ) ; return format ( new Date ( the_time ) , 'yyyy-MM-dd HH:mm:ss' ) ; } ;