提交 2b89a2c7 编写于 作者: R rriggs

8062803: 'principal' should be 'principle' in java.time package description

8062796: java.time.format.DateTimeFormatter error in API doc example
Reviewed-by: lancea, mchung, coffeys
上级 58c733a5
...@@ -117,8 +117,9 @@ import java.util.Set; ...@@ -117,8 +117,9 @@ import java.util.Set;
* {@code parse(CharSequence text, DateTimeFormatter formatter)}. * {@code parse(CharSequence text, DateTimeFormatter formatter)}.
* <p>For example: * <p>For example:
* <blockquote><pre> * <blockquote><pre>
* LocalDate date = LocalDate.now();
* String text = date.format(formatter); * String text = date.format(formatter);
* LocalDate date = LocalDate.parse(text, formatter); * LocalDate parsedDate = LocalDate.parse(text, formatter);
* </pre></blockquote> * </pre></blockquote>
* <p> * <p>
* In addition to the format, formatters can be created with desired Locale, * In addition to the format, formatters can be created with desired Locale,
...@@ -265,9 +266,10 @@ import java.util.Set; ...@@ -265,9 +266,10 @@ import java.util.Set;
* <p> * <p>
* For example: * For example:
* <blockquote><pre> * <blockquote><pre>
* LocalDate date = LocalDate.now();
* DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy MM dd"); * DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy MM dd");
* String text = date.format(formatter); * String text = date.format(formatter);
* LocalDate date = LocalDate.parse(text, formatter); * LocalDate parsedDate = LocalDate.parse(text, formatter);
* </pre></blockquote> * </pre></blockquote>
* <p> * <p>
* All letters 'A' to 'Z' and 'a' to 'z' are reserved as pattern letters. The * All letters 'A' to 'Z' and 'a' to 'z' are reserved as pattern letters. The
......
/* /*
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
* The main API for dates, times, instants, and durations. * The main API for dates, times, instants, and durations.
* </p> * </p>
* <p> * <p>
* The classes defined here represent the principal date-time concepts, * The classes defined here represent the principle date-time concepts,
* including instants, durations, dates, times, time-zones and periods. * including instants, durations, dates, times, time-zones and periods.
* They are based on the ISO calendar system, which is the <i>de facto</i> world * They are based on the ISO calendar system, which is the <i>de facto</i> world
* calendar following the proleptic Gregorian rules. * calendar following the proleptic Gregorian rules.
...@@ -247,8 +247,8 @@ ...@@ -247,8 +247,8 @@
* </ul> * </ul>
* <p> * <p>
* Multiple calendar systems is an awkward addition to the design challenges. * Multiple calendar systems is an awkward addition to the design challenges.
* The first principal is that most users want the standard ISO calendar system. * The first principle is that most users want the standard ISO calendar system.
* As such, the main classes are ISO-only. The second principal is that most of those that want a * As such, the main classes are ISO-only. The second principle is that most of those that want a
* non-ISO calendar system want it for user interaction, thus it is a UI localization issue. * non-ISO calendar system want it for user interaction, thus it is a UI localization issue.
* As such, date and time objects should be held as ISO objects in the data model and persistent * As such, date and time objects should be held as ISO objects in the data model and persistent
* storage, only being converted to and from a local calendar for display. * storage, only being converted to and from a local calendar for display.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册