import { app } from '/src/app/global-api';
const $app = app;
      
/*
* 可通过 this.$WEAPPS_COMP.handler.xxx 访问这里定义的方法
* 
* 如果需要 async-await，请修改成 export default async function() {}
*/

export default function(value) {
    let date = typeof value === "number" ? new Date(value): new Date(`${value}T00:00:00+0800`);
    if(isNaN(date)){
        date = new Date(`${value.replace(/-/g,"/")} 00:00:00`)
    };
    return date.valueOf() 
};