本文整理汇总了Java中org.threeten.bp.Clock.systemUTC方法的典型用法代码示例。如果您正苦于以下问题:Java Clock.systemUTC方法的具体用法?Java Clock.systemUTC怎么用?Java Clock.systemUTC使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.threeten.bp.Clock
的用法示例。
在下文中一共展示了Clock.systemUTC方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeBaseDirectoryName
import org.threeten.bp.Clock; //导入方法依赖的package包/类
/**
* @return
*/
private String makeBaseDirectoryName() {
Clock clock = Clock.systemUTC();
LocalDate today = LocalDate.now(clock);
StringBuilder buf = new StringBuilder();
buf.append(_rootDir).append(File.separator);
int year = today.getYear();
if (year < 10) {
buf.append("0").append(year);
} else {
buf.append(year);
}
buf.append(File.separator);
int month = today.getMonthValue();
if (month < 10) {
buf.append("0").append(month);
} else {
buf.append(month);
}
buf.append(File.separator);
int dayOfMonth = today.getDayOfMonth();
if (dayOfMonth < 10) {
buf.append("0").append(dayOfMonth);
} else {
buf.append(dayOfMonth);
}
return buf.toString();
}
示例2: getToday
import org.threeten.bp.Clock; //导入方法依赖的package包/类
private LocalDate getToday() {
//I think 0000 UTC is when bloomberg tips over
Clock clock = Clock.systemUTC();
return LocalDate.now(clock);
}
示例3: getLatestWeekDay
import org.threeten.bp.Clock; //导入方法依赖的package包/类
private LocalDate getLatestWeekDay() {
Clock clock = Clock.systemUTC();
return DateUtils.previousWeekDay(LocalDate.now(clock).plusDays(1));
}
开发者ID:DevStreet,项目名称:FinanceAnalytics,代码行数:5,代码来源:BloombergBpipeHistoricalTimeSeriesProviderTest.java
示例4: previousWeekDay
import org.threeten.bp.Clock; //导入方法依赖的package包/类
/**
* Gets the previous Monday to Friday week-day before now.
*
* @return the date, not null
*/
public static LocalDate previousWeekDay() {
Clock clock = Clock.systemUTC();
return previousWeekDay(LocalDate.now(clock));
}
示例5: nextWeekDay
import org.threeten.bp.Clock; //导入方法依赖的package包/类
/**
* Gets the next Monday to Friday week-day after now.
*
* @return the date, not null
*/
public static LocalDate nextWeekDay() {
Clock clock = Clock.systemUTC();
return nextWeekDay(LocalDate.now(clock));
}