当前位置: 首页>>代码示例>>Java>>正文


Java DateTimeFormatter.ISO_LOCAL_DATE属性代码示例

本文整理汇总了Java中java.time.format.DateTimeFormatter.ISO_LOCAL_DATE属性的典型用法代码示例。如果您正苦于以下问题:Java DateTimeFormatter.ISO_LOCAL_DATE属性的具体用法?Java DateTimeFormatter.ISO_LOCAL_DATE怎么用?Java DateTimeFormatter.ISO_LOCAL_DATE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在java.time.format.DateTimeFormatter的用法示例。


在下文中一共展示了DateTimeFormatter.ISO_LOCAL_DATE属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: main

public static void main(String[] args) {
    DateTimeFormatter formatter1 = DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM);
    DateTimeFormatter formatter2 = DateTimeFormatter.ofLocalizedTime(FormatStyle.FULL);
    DateTimeFormatter formatter3 = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.LONG);
    DateTimeFormatter formatter4 = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.SHORT, FormatStyle.SHORT);

    DateTimeFormatter formatter5 = DateTimeFormatter.BASIC_ISO_DATE;

    // 2057-08-11
    DateTimeFormatter isoLocalDate = DateTimeFormatter.ISO_LOCAL_DATE;
    DateTimeFormatter isoDate = DateTimeFormatter.ISO_DATE;

    // 14:30:15.312
    DateTimeFormatter isoTime = DateTimeFormatter.ISO_TIME;
    DateTimeFormatter isoLocalTime = DateTimeFormatter.ISO_LOCAL_TIME;

    // 2050-08-11T14:30:15.312
    DateTimeFormatter isoDateTime = DateTimeFormatter.ISO_DATE_TIME;
    DateTimeFormatter isoLocaDateTime = DateTimeFormatter.ISO_LOCAL_DATE_TIME;


}
 
开发者ID:huby,项目名称:java-se8-oca-study-guide,代码行数:22,代码来源:Main.java

示例2: main

public static void main(String[] args) throws XPathExpressionException,
			ParserConfigurationException, SAXException, IOException,
			TransformerException {

		char separator = '+';
		DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ISO_LOCAL_DATE;
		boolean filterFrom = false;
		boolean filterTo = false;
		boolean applyKeywordSearch = false;
		LocalDate fromDate = LocalDate.MIN;
		LocalDate toDate = LocalDate.MAX;
		String keyword = "";

		// Load the Data into FusableDataSet
		FusibleDataSet<Event, Attribute> fusibleDataSetD = new FusibleHashedDataSet<>();
//		fusibleDataSetD.loadFromTSV(new File("WDI/usecase/event/input/dbpedia-1_s.tsv"),
//				new EventFactory(dateTimeFormatter, filterFrom, fromDate, filterTo, toDate, applyKeywordSearch, keyword), "events/event", separator, dateTimeFormatter, false, fromDate, false, toDate, true, keyword);


		FusibleDataSet<Event, Attribute> fusibleDataSetY = new FusibleHashedDataSet<>();
//		fusibleDataSetY.loadFromTSV(new File("WDI/usecase/event/input/yago-1_s.tsv"),
//				new EventFactory(dateTimeFormatter, filterFrom, fromDate, filterTo, toDate, applyKeywordSearch, keyword), "events/event", separator, dateTimeFormatter, false, fromDate, false, toDate, true, keyword);


		runDataFusion(fusibleDataSetD,
				fusibleDataSetY,
				//null,
				separator, dateTimeFormatter, filterFrom, fromDate, filterTo, toDate, applyKeywordSearch, keyword);

	}
 
开发者ID:olehmberg,项目名称:winter,代码行数:30,代码来源:Events_DataFusion_Main.java

示例3: SimpleLocalDateDeserializer

public SimpleLocalDateDeserializer() {
    super(DateTimeFormatter.ISO_LOCAL_DATE);
}
 
开发者ID:robinhowlett,项目名称:chart-parser,代码行数:3,代码来源:SimpleLocalDateDeserializer.java


注:本文中的java.time.format.DateTimeFormatter.ISO_LOCAL_DATE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。