/** 写入时间字符串表示(ms),onlyDay仅仅需要显示到天 */ public static void writeTimeStr(StringBuilder sb, long time, bool onlyDay = false) { DateData date = new DateData(); date.initByTimeMillis(time); date.writeToStringBuilder(sb, onlyDay); }
/** 获取下一个cron时刻(ms) */ public static DateData getNextCronDate(string cron, DateData data) { DateData date = new DateData(); date.initByTimeMillis(getNextCronTime(cron, data.getTimeMillis())); return(date); }