export const ONE_DAY = 24 * 60 * 60 * 1000 export const NFT_BEGIN_DAY = new Date(2023, 4, 8) export const NFT_TYPE = { badge1: 100, //2022NFT购买用户奖励徽章 badge2: 101, badge3: 102, badge4: 103, } export const MINT_CHANNEL = { claim: '01', // 2022购买用户claim } // calc days between two Date export function daysBetween(date1: Date, date2: Date) { // hours*minutes*seconds*milliseconds const diffInMs = Math.abs(date1.getTime() - date2.getTime()) const diffInDays = Math.round(diffInMs / ONE_DAY) return diffInDays }