mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
23 lines
1.2 KiB
HTML
23 lines
1.2 KiB
HTML
<html>
|
|
<body>
|
|
Reports date format patterns that are likely used by mistake.
|
|
<p>The following patterns are reported:</p>
|
|
<ul>
|
|
<li>Uppercase "Y", unless "w" appears nearby. It stands for "Week year" that is almost always
|
|
the same as normal "Year" (lowercase "y" pattern), but may point to the next year
|
|
at the end of December.</li>
|
|
<li>Uppercase "M" (month) close to "H", "K", "h", or "k" (hour). It's likely that a lowercase "m" (minute) was intended.</li>
|
|
<li>Lowercase "m" (minute) close to "y" (year) or "d" (day in month). It's likely that an uppercase "M" (month) was intended.</li>
|
|
<li>Uppercase "D" (day in year) close to "M", or "L" (month). It's likely that a lowercase "d" (day in month) was intended.</li>
|
|
<li>Uppercase "S" (milliseconds) close to "m" (minutes). It's likely that a lowercase "s" (seconds) was intended.</li>
|
|
</ul>
|
|
<p>
|
|
Examples:<br>
|
|
<code>new SimpleDateFormat("YYYY-MM-dd")</code>: likely <code>"yyyy-MM-dd"</code> was intended.<br>
|
|
<code>new SimpleDateFormat("yyyy-MM-DD")</code>: likely <code>"yyyy-MM-dd"</code> was intended.<br>
|
|
<code>new SimpleDateFormat("HH:MM")</code>: likely <code>"HH:mm"</code> was intended.
|
|
</p>
|
|
<!-- tooltip end -->
|
|
<p><small>New in 2020.1</small></p>
|
|
</body>
|
|
</html> |