木心

毕竟几人真得鹿,不知终日梦为鱼

导航

2020年1月20日 #

JavaScript日期加减

摘要: JavaScript日期加减 var date = new Date() // 对日期加减: date.setDate(date.getDate() + n) // 对月加减: date.setMonth(date.getMonth() + n) // 对年加减: date.setFullYear( 阅读全文

posted @ 2020-01-20 11:12 wenbin_ouyang 阅读(3752) 评论(0) 推荐(0) 编辑

javascript乘除算法解决浮点精度

摘要: 参考https://www.cnblogs.com/tongshuangxiong/p/11200899.html mathDivide = (arg1, arg2, precision) => { if (precision undefined) precision = 4 let t1 = 0, 阅读全文

posted @ 2020-01-20 10:35 wenbin_ouyang 阅读(171) 评论(0) 推荐(0) 编辑