TypeScript获取格式化日期

代码挺简单的,可是写出来却花费了很多功夫,主要仍是不适应ts的类型机制。记下来备忘。javascript static getNowDate(): string { const date = new Date(); let month: string | number = date.getMonth() + 1; let strDate: string | number = date.
相关文章
相关标签/搜索