From f2c4e3ab486207412ff9ac8678f0237e3828d2ca Mon Sep 17 00:00:00 2001 From: Thad Guidry Date: Fri, 30 Aug 2013 09:09:54 -0500 Subject: [PATCH] Added ability to extract MILLISECOND to datePart (milliseconds,ms,S) --- main/src/com/google/refine/expr/functions/date/DatePart.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main/src/com/google/refine/expr/functions/date/DatePart.java b/main/src/com/google/refine/expr/functions/date/DatePart.java index 635290ab3..126838c6d 100644 --- a/main/src/com/google/refine/expr/functions/date/DatePart.java +++ b/main/src/com/google/refine/expr/functions/date/DatePart.java @@ -75,6 +75,8 @@ public class DatePart implements Function { return c.get(Calendar.MINUTE); } else if ("seconds".equals(part) || "sec".equals(part) || "s".equals(part)) { return c.get(Calendar.SECOND); + } else if ("milliseconds".equals(part) || "ms".equals(part) || "S".equals(part)) { + return c.get(Calendar.MILLISECOND); } else if ("years".equals(part) || "year".equals(part)) { return c.get(Calendar.YEAR); } else if ("months".equals(part) || "month".equals(part)) { // avoid 'm' to avoid confusion with minute