diff options
author | James Ahlborn <jtahlborn@yahoo.com> | 2019-02-06 04:03:19 +0000 |
---|---|---|
committer | James Ahlborn <jtahlborn@yahoo.com> | 2019-02-06 04:03:19 +0000 |
commit | 92caa33ac2638c1a76d1f41cdd78b0ea654b19aa (patch) | |
tree | db71873b181f3cab70340ec92f9efd2ed7a96b72 | |
parent | cce4895ee87e0ec4a1ec58c4f64d2ebdb8252cdf (diff) | |
download | jackcess-92caa33ac2638c1a76d1f41cdd78b0ea654b19aa.tar.gz jackcess-92caa33ac2638c1a76d1f41cdd78b0ea654b19aa.zip |
minor cleanups
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@1282 f203690c-595d-4dc9-a70b-905162fa7fd2
-rw-r--r-- | src/main/java/com/healthmarketscience/jackcess/impl/expr/DefaultDateFunctions.java | 2 | ||||
-rw-r--r-- | src/main/java/com/healthmarketscience/jackcess/impl/expr/FormatUtil.java | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/com/healthmarketscience/jackcess/impl/expr/DefaultDateFunctions.java b/src/main/java/com/healthmarketscience/jackcess/impl/expr/DefaultDateFunctions.java index 31d919b..05c31df 100644 --- a/src/main/java/com/healthmarketscience/jackcess/impl/expr/DefaultDateFunctions.java +++ b/src/main/java/com/healthmarketscience/jackcess/impl/expr/DefaultDateFunctions.java @@ -535,7 +535,7 @@ public class DefaultDateFunctions private static TextStyle getTextStyle(EvalContext ctx, Value[] params, int idx) { - boolean abbreviate = getOptionalBooleanParam(ctx, params, 1); + boolean abbreviate = getOptionalBooleanParam(ctx, params, idx); return (abbreviate ? TextStyle.SHORT : TextStyle.FULL); } diff --git a/src/main/java/com/healthmarketscience/jackcess/impl/expr/FormatUtil.java b/src/main/java/com/healthmarketscience/jackcess/impl/expr/FormatUtil.java index 6dfc2e3..14ad3fa 100644 --- a/src/main/java/com/healthmarketscience/jackcess/impl/expr/FormatUtil.java +++ b/src/main/java/com/healthmarketscience/jackcess/impl/expr/FormatUtil.java @@ -430,13 +430,13 @@ public class FormatUtil switch(curFormatType) { case FCT_GENERAL: - return parseCustomGeneralFormat(buf, args); + return parseCustomGeneralFormat(buf); case FCT_DATE: return parseCustomDateFormat(buf, args); case FCT_NUMBER: return parseCustomNumberFormat(buf, args); case FCT_TEXT: - return parseCustomTextFormat(buf, args); + return parseCustomTextFormat(buf); default: throw new EvalException("Invalid format type " + curFormatType); } @@ -484,7 +484,7 @@ public class FormatUtil return FCT_GENERAL; } - private static Fmt parseCustomGeneralFormat(ExprBuf buf, Args args) { + private static Fmt parseCustomGeneralFormat(ExprBuf buf) { // a "general" format is actually a "yes/no" format which functions almost // exactly like a number format (without any number format specific chars) @@ -604,7 +604,7 @@ public class FormatUtil } break; case FCT_DATE: - parseCustomDateFormatPattern(c, buf, dfbs, fmtState, args); + parseCustomDateFormatPattern(c, buf, dfbs, fmtState); break; default: dfbs.add(buildLiteralCharDFB(c)); @@ -634,7 +634,7 @@ public class FormatUtil private static void parseCustomDateFormatPattern( char c, ExprBuf buf, List<DateFormatBuilder> dfbs, - boolean[] fmtState, Args args) { + boolean[] fmtState) { if((c == DT_LIT_COLON_CHAR) || (c == DT_LIT_SLASH_CHAR)) { // date/time literal char, nothing more to do @@ -979,7 +979,7 @@ public class FormatUtil return new DecimalBDFormat(df); } - private static Fmt parseCustomTextFormat(ExprBuf buf, Args args) { + private static Fmt parseCustomTextFormat(ExprBuf buf) { Fmt fmt = null; |