Scala,根据时间获取昨天,本月,环比上月,上月的格式化时间
下面是代码实现,返回结果如样式所示。def getCalendar(day: Date): Calendar = { val c = Calendar.getInstance c.clear if (day != null) c.setTime(day) c}def getTongBiDate(date1: String): (String, String, String, String, String) = { val dft = new SimpleDateFormat.
原创
2021-01-14 17:10:32 ·
720 阅读 ·
0 评论