我是靠谱客的博主 忧郁黑夜,这篇文章主要介绍从当天0点到现在的时间轴集合(小时为单位),现在分享给大家,希望可以做个参考。

package com.test;
import java.util.ArrayList;
import java.util.List;
import com.common.DataUtils;
public class QueryTest {
public static void main(String[] args) {
List<Integer> xDataLine = new ArrayList<Integer>(); // 时间轴每小时
// 时间轴
Long size = DataUtils.getLong(com.avatar.gdk.util.DateUtils.getCurrentTime("HH"))+1;
for (int i = 0; i < size; i++) {
xDataLine.add(i);
}
System.out.println(xDataLine);
// 现在时间是 11:40
// 结果为 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
}
}

最后

以上就是忧郁黑夜最近收集整理的关于从当天0点到现在的时间轴集合(小时为单位)的全部内容,更多相关从当天0点到现在内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(48)

评论列表共有 0 条评论

立即
投稿
返回
顶部