提交 ba233fa2 authored 作者: thomasmueller's avatar thomasmueller

Javadocs

上级 0f7a451f
...@@ -376,7 +376,10 @@ public class ConnectionInfo implements Cloneable { ...@@ -376,7 +376,10 @@ public class ConnectionInfo implements Cloneable {
if (nameNormalized == null) { if (nameNormalized == null) {
if (!SysProperties.IMPLICIT_RELATIVE_PATH) { if (!SysProperties.IMPLICIT_RELATIVE_PATH) {
if (!FileUtils.isAbsolute(name)) { if (!FileUtils.isAbsolute(name)) {
if (!name.contains("./") && !name.contains(".\\") && !name.contains(":/") && !name.contains(":\\")) { if (!name.contains("./") &&
!name.contains(".\\") &&
!name.contains(":/") &&
!name.contains(":\\")) {
// the name could start with "./", or // the name could start with "./", or
// it could start with a prefix such as "nio:./" // it could start with a prefix such as "nio:./"
// for Windows, the path "\test" is not considered // for Windows, the path "\test" is not considered
......
...@@ -385,7 +385,7 @@ public final class DateTimeFunctions { ...@@ -385,7 +385,7 @@ public final class DateTimeFunctions {
* Truncate the given date to the unit specified * Truncate the given date to the unit specified
* *
* @param datePartStr the time unit (e.g. 'DAY', 'HOUR', etc.) * @param datePartStr the time unit (e.g. 'DAY', 'HOUR', etc.)
* @param value the date * @param valueDate the date
* @return date truncated to 'day' * @return date truncated to 'day'
*/ */
public static Value truncateDate(String datePartStr, Value valueDate) { public static Value truncateDate(String datePartStr, Value valueDate) {
......
...@@ -729,6 +729,13 @@ public class DateTimeUtils { ...@@ -729,6 +729,13 @@ public class DateTimeUtils {
return getDayOfWeekFromAbsolute(absoluteDayFromDateValue(dateValue), firstDayOfWeek); return getDayOfWeekFromAbsolute(absoluteDayFromDateValue(dateValue), firstDayOfWeek);
} }
/**
* Get the day of the week from the absolute day value.
*
* @param absoluteValue the absolute day
* @param firstDayOfWeek the first day of the week
* @return the day of week
*/
public static int getDayOfWeekFromAbsolute(long absoluteValue, int firstDayOfWeek) { public static int getDayOfWeekFromAbsolute(long absoluteValue, int firstDayOfWeek) {
return absoluteValue >= 0 ? (int) ((absoluteValue - firstDayOfWeek + 11) % 7) + 1 return absoluteValue >= 0 ? (int) ((absoluteValue - firstDayOfWeek + 11) % 7) + 1
: (int) ((absoluteValue - firstDayOfWeek - 2) % 7) + 7; : (int) ((absoluteValue - firstDayOfWeek - 2) % 7) + 7;
......
...@@ -770,5 +770,5 @@ openoffice organize libre systemtables gmane sea borders announced millennium al ...@@ -770,5 +770,5 @@ openoffice organize libre systemtables gmane sea borders announced millennium al
opti excessively opti excessively
iterators tech enums incompatibilities loses reimplement readme reorganize iterators tech enums incompatibilities loses reimplement readme reorganize milli subdirectory
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论