diff --git a/asterix-algebra/src/main/java/edu/uci/ics/asterix/jobgen/AqlLogicalExpressionJobGen.java b/asterix-algebra/src/main/java/edu/uci/ics/asterix/jobgen/AqlLogicalExpressionJobGen.java
index 9717d6a..f515516 100644
--- a/asterix-algebra/src/main/java/edu/uci/ics/asterix/jobgen/AqlLogicalExpressionJobGen.java
+++ b/asterix-algebra/src/main/java/edu/uci/ics/asterix/jobgen/AqlLogicalExpressionJobGen.java
@@ -4,28 +4,22 @@
 
 import org.apache.commons.lang3.mutable.Mutable;
 
+import edu.uci.ics.asterix.common.functions.FunctionDescriptorTag;
 import edu.uci.ics.asterix.formats.base.IDataFormat;
 import edu.uci.ics.asterix.metadata.declared.AqlCompiledMetadataDeclarations;
 import edu.uci.ics.asterix.metadata.declared.AqlMetadataProvider;
 import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
 import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
-import edu.uci.ics.asterix.runtime.base.IAggregateFunctionDynamicDescriptor;
-import edu.uci.ics.asterix.runtime.base.IRunningAggregateFunctionDynamicDescriptor;
-import edu.uci.ics.asterix.runtime.base.IScalarFunctionDynamicDescriptor;
-import edu.uci.ics.asterix.runtime.base.ISerializableAggregateFunctionDynamicDescriptor;
-import edu.uci.ics.asterix.runtime.base.IUnnestingFunctionDynamicDescriptor;
 import edu.uci.ics.asterix.runtime.evaluators.comparisons.ComparisonEvalFactory;
 import edu.uci.ics.asterix.runtime.formats.FormatUtils;
 import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
 import edu.uci.ics.hyracks.algebricks.core.algebra.base.ILogicalExpression;
 import edu.uci.ics.hyracks.algebricks.core.algebra.base.LogicalVariable;
 import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression.FunctionKind;
 import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.AggregateFunctionCallExpression;
 import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.ConstantExpression;
 import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.ILogicalExpressionJobGen;
 import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.ScalarFunctionCallExpression;
 import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.StatefulFunctionCallExpression;
 import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.UnnestingFunctionCallExpression;
 import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.VariableReferenceExpression;
@@ -53,79 +47,25 @@
             IVariableTypeEnvironment env, IOperatorSchema[] inputSchemas, JobGenContext context)
             throws AlgebricksException {
         ICopyEvaluatorFactory[] args = codegenArguments(expr, env, inputSchemas, context);
-        IFunctionDescriptor fd;
-        AqlMetadataProvider mp = (AqlMetadataProvider) context.getMetadataProvider();
-        AqlCompiledMetadataDeclarations compiledDecls = mp.getMetadataDeclarations();
-        try {
-            fd = compiledDecls.getFormat().resolveFunction(expr, env);
-        } catch (AlgebricksException e) {
-            throw new AlgebricksException(e);
-        }
+        IFunctionDescriptor fd = getFunctionDescriptor(expr, env, context);
         switch (fd.getFunctionDescriptorTag()) {
-            case SCALAR: {
-                throw new AlgebricksException(
-                        "Trying to create an aggregate from a scalar evaluator function descriptor. (fi="
-                                + expr.getFunctionIdentifier() + ")");
-            }
-            case AGGREGATE: {
-                IAggregateFunctionDynamicDescriptor afdd = (IAggregateFunctionDynamicDescriptor) fd;
-                return afdd.createAggregateFunctionFactory(args);
-            }
-            case SERIALAGGREGATE: {
-                // temporal hack
+            case SERIALAGGREGATE:
                 return null;
-            }
-            case RUNNINGAGGREGATE: {
-                throw new AlgebricksException(
-                        "Trying to create an aggregate from a running aggregate function descriptor.");
-            }
-            case UNNEST: {
-                throw new AlgebricksException(
-                        "Trying to create an aggregate from an unnesting aggregate function descriptor.");
-            }
-
-            default: {
-                throw new IllegalStateException(fd.getFunctionDescriptorTag().toString());
-            }
+            case AGGREGATE:
+                return fd.createAggregateFunctionFactory(args);
+            default:
+                throw new IllegalStateException("Invalid function descriptor " + fd.getFunctionDescriptorTag()
+                        + " expected " + FunctionDescriptorTag.SERIALAGGREGATE + " or "
+                        + FunctionDescriptorTag.AGGREGATE);
         }
-
     }
 
     @Override
-    public ICopyRunningAggregateFunctionFactory createRunningAggregateFunctionFactory(StatefulFunctionCallExpression expr,
-            IVariableTypeEnvironment env, IOperatorSchema[] inputSchemas, JobGenContext context)
-            throws AlgebricksException {
+    public ICopyRunningAggregateFunctionFactory createRunningAggregateFunctionFactory(
+            StatefulFunctionCallExpression expr, IVariableTypeEnvironment env, IOperatorSchema[] inputSchemas,
+            JobGenContext context) throws AlgebricksException {
         ICopyEvaluatorFactory[] args = codegenArguments(expr, env, inputSchemas, context);
-        IFunctionDescriptor fd;
-        AqlMetadataProvider mp = (AqlMetadataProvider) context.getMetadataProvider();
-        AqlCompiledMetadataDeclarations compiledDecls = mp.getMetadataDeclarations();
-        try {
-            fd = compiledDecls.getFormat().resolveFunction(expr, env);
-        } catch (AlgebricksException e) {
-            throw new AlgebricksException(e);
-        }
-        switch (fd.getFunctionDescriptorTag()) {
-            case SCALAR: {
-                throw new AlgebricksException(
-                        "Trying to create a running aggregate from a scalar evaluator function descriptor. (fi="
-                                + expr.getFunctionIdentifier() + ")");
-            }
-            case AGGREGATE: {
-                throw new AlgebricksException(
-                        "Trying to create a running aggregate from an aggregate function descriptor.");
-            }
-            case UNNEST: {
-                throw new AlgebricksException(
-                        "Trying to create a running aggregate from an unnesting function descriptor.");
-            }
-            case RUNNINGAGGREGATE: {
-                IRunningAggregateFunctionDynamicDescriptor rafdd = (IRunningAggregateFunctionDynamicDescriptor) fd;
-                return rafdd.createRunningAggregateFunctionFactory(args);
-            }
-            default: {
-                throw new IllegalStateException();
-            }
-        }
+        return getFunctionDescriptor(expr, env, context).createRunningAggregateFunctionFactory(args);
     }
 
     @Override
@@ -133,52 +73,33 @@
             IVariableTypeEnvironment env, IOperatorSchema[] inputSchemas, JobGenContext context)
             throws AlgebricksException {
         ICopyEvaluatorFactory[] args = codegenArguments(expr, env, inputSchemas, context);
-        IFunctionDescriptor fd;
-        AqlMetadataProvider mp = (AqlMetadataProvider) context.getMetadataProvider();
-        AqlCompiledMetadataDeclarations compiledDecls = mp.getMetadataDeclarations();
-        try {
-            fd = compiledDecls.getFormat().resolveFunction(expr, env);
-        } catch (AlgebricksException e) {
-            throw new AlgebricksException(e);
-        }
-        switch (fd.getFunctionDescriptorTag()) {
-            case UNNEST: {
-                IUnnestingFunctionDynamicDescriptor ufdd = (IUnnestingFunctionDynamicDescriptor) fd;
-                return ufdd.createUnnestingFunctionFactory(args);
-            }
-            default: {
-                throw new AlgebricksException("Trying to create an unnesting function descriptor from a "
-                        + fd.getFunctionDescriptorTag() + ". (fid=" + expr.getFunctionIdentifier() + ")");
-            }
-        }
+        return getFunctionDescriptor(expr, env, context).createUnnestingFunctionFactory(args);
     }
 
     @Override
     public ICopyEvaluatorFactory createEvaluatorFactory(ILogicalExpression expr, IVariableTypeEnvironment env,
             IOperatorSchema[] inputSchemas, JobGenContext context) throws AlgebricksException {
+        ICopyEvaluatorFactory copyEvaluatorFactory = null;
         switch (expr.getExpressionTag()) {
             case VARIABLE: {
                 VariableReferenceExpression v = (VariableReferenceExpression) expr;
-                return createVariableEvaluatorFactory(v, inputSchemas, context);
+                copyEvaluatorFactory = createVariableEvaluatorFactory(v, inputSchemas, context);
+                return copyEvaluatorFactory;
             }
             case CONSTANT: {
                 ConstantExpression c = (ConstantExpression) expr;
-                return createConstantEvaluatorFactory(c, inputSchemas, context);
+                copyEvaluatorFactory = createConstantEvaluatorFactory(c, inputSchemas, context);
+                return copyEvaluatorFactory;
             }
             case FUNCTION_CALL: {
-                AbstractFunctionCallExpression fun = (AbstractFunctionCallExpression) expr;
-                if (fun.getKind() == FunctionKind.SCALAR) {
-                    ScalarFunctionCallExpression scalar = (ScalarFunctionCallExpression) fun;
-                    return createScalarFunctionEvaluatorFactory(scalar, env, inputSchemas, context);
-                } else {
-                    throw new AlgebricksException("Cannot create evaluator for function " + fun + " of kind "
-                            + fun.getKind());
-                }
+                copyEvaluatorFactory = createScalarFunctionEvaluatorFactory((AbstractFunctionCallExpression) expr, env,
+                        inputSchemas, context);
+                return copyEvaluatorFactory;
             }
-            default: {
+            default:
                 throw new IllegalStateException();
-            }
         }
+
     }
 
     private ICopyEvaluatorFactory createVariableEvaluatorFactory(VariableReferenceExpression expr,
@@ -203,31 +124,15 @@
             return new ComparisonEvalFactory(args[0], args[1], ck);
         }
 
-        IFunctionDescriptor fd;
-
+        IFunctionDescriptor fd = null;
         AqlMetadataProvider mp = (AqlMetadataProvider) context.getMetadataProvider();
         IDataFormat format = mp == null ? FormatUtils.getDefaultFormat() : mp.getMetadataDeclarations().getFormat();
-        try {
-            fd = format.resolveFunction(expr, env);
-        } catch (AlgebricksException e) {
-            throw new AlgebricksException(e);
-        }
-
-        switch (fd.getFunctionDescriptorTag()) {
-            case SCALAR: {
-                IScalarFunctionDynamicDescriptor sfdd = (IScalarFunctionDynamicDescriptor) fd;
-                return sfdd.createEvaluatorFactory(args);
-            }
-            default: {
-                throw new AlgebricksException("Trying to create a scalar function descriptor from a "
-                        + fd.getFunctionDescriptorTag() + ". (fid=" + fi + ")");
-            }
-        }
-
+        fd = format.resolveFunction(expr, env);
+        return fd.createEvaluatorFactory(args);
     }
 
-    private ICopyEvaluatorFactory createConstantEvaluatorFactory(ConstantExpression expr, IOperatorSchema[] inputSchemas,
-            JobGenContext context) throws AlgebricksException {
+    private ICopyEvaluatorFactory createConstantEvaluatorFactory(ConstantExpression expr,
+            IOperatorSchema[] inputSchemas, JobGenContext context) throws AlgebricksException {
         AqlMetadataProvider mp = (AqlMetadataProvider) context.getMetadataProvider();
         IDataFormat format = mp == null ? FormatUtils.getDefaultFormat() : mp.getMetadataDeclarations().getFormat();
         return format.getConstantEvalFactory(expr.getValue());
@@ -250,27 +155,15 @@
             AggregateFunctionCallExpression expr, IVariableTypeEnvironment env, IOperatorSchema[] inputSchemas,
             JobGenContext context) throws AlgebricksException {
         ICopyEvaluatorFactory[] args = codegenArguments(expr, env, inputSchemas, context);
-        IFunctionDescriptor fd;
-        AqlMetadataProvider mp = (AqlMetadataProvider) context.getMetadataProvider();
-        AqlCompiledMetadataDeclarations compiledDecls = mp.getMetadataDeclarations();
-        try {
-            fd = compiledDecls.getFormat().resolveFunction(expr, env);
-        } catch (AlgebricksException e) {
-            throw new AlgebricksException(e);
-        }
+        IFunctionDescriptor fd = getFunctionDescriptor(expr, env, context);
+
         switch (fd.getFunctionDescriptorTag()) {
-            case SCALAR: {
-                throw new AlgebricksException(
-                        "Trying to create an aggregate from a scalar evaluator function descriptor. (fi="
-                                + expr.getFunctionIdentifier() + ")");
-            }
             case AGGREGATE: {
                 if (AsterixBuiltinFunctions.isAggregateFunctionSerializable(fd.getIdentifier())) {
                     AggregateFunctionCallExpression serialAggExpr = AsterixBuiltinFunctions
                             .makeSerializableAggregateFunctionExpression(fd.getIdentifier(), expr.getArguments());
-                    ISerializableAggregateFunctionDynamicDescriptor afdd = (ISerializableAggregateFunctionDynamicDescriptor) compiledDecls
-                            .getFormat().resolveFunction(serialAggExpr, env);
-                    return afdd.createAggregateFunctionFactory(args);
+                    IFunctionDescriptor afdd = getFunctionDescriptor(serialAggExpr, env, context);
+                    return afdd.createSerializableAggregateFunctionFactory(args);
                 } else {
                     throw new AlgebricksException(
                             "Trying to create a serializable aggregate from a non-serializable aggregate function descriptor. (fi="
@@ -278,22 +171,23 @@
                 }
             }
             case SERIALAGGREGATE: {
-                ISerializableAggregateFunctionDynamicDescriptor afdd = (ISerializableAggregateFunctionDynamicDescriptor) fd;
-                return afdd.createAggregateFunctionFactory(args);
-            }
-            case RUNNINGAGGREGATE: {
-                throw new AlgebricksException(
-                        "Trying to create an aggregate from a running aggregate function descriptor.");
-            }
-            case UNNEST: {
-                throw new AlgebricksException(
-                        "Trying to create an aggregate from an unnesting aggregate function descriptor.");
+                return fd.createSerializableAggregateFunctionFactory(args);
             }
 
-            default: {
-                throw new IllegalStateException();
-            }
+            default:
+                throw new IllegalStateException("Invalid function descriptor " + fd.getFunctionDescriptorTag()
+                        + " expected " + FunctionDescriptorTag.SERIALAGGREGATE + " or "
+                        + FunctionDescriptorTag.AGGREGATE);
         }
     }
 
+    private IFunctionDescriptor getFunctionDescriptor(AbstractFunctionCallExpression expr,
+            IVariableTypeEnvironment env, JobGenContext context) throws AlgebricksException {
+        IFunctionDescriptor fd;
+        AqlMetadataProvider mp = (AqlMetadataProvider) context.getMetadataProvider();
+        AqlCompiledMetadataDeclarations compiledDecls = mp.getMetadataDeclarations();
+        fd = compiledDecls.getFormat().resolveFunction(expr, env);
+        return fd;
+    }
+
 }
diff --git a/asterix-algebra/src/main/java/edu/uci/ics/asterix/optimizer/base/RuleCollections.java b/asterix-algebra/src/main/java/edu/uci/ics/asterix/optimizer/base/RuleCollections.java
index 3b11b0a..0f28239 100644
--- a/asterix-algebra/src/main/java/edu/uci/ics/asterix/optimizer/base/RuleCollections.java
+++ b/asterix-algebra/src/main/java/edu/uci/ics/asterix/optimizer/base/RuleCollections.java
@@ -28,7 +28,6 @@
 import edu.uci.ics.asterix.optimizer.rules.FuzzyEqRule;
 import edu.uci.ics.asterix.optimizer.rules.FuzzyJoinRule;
 import edu.uci.ics.asterix.optimizer.rules.IfElseToSwitchCaseFunctionRule;
-import edu.uci.ics.asterix.optimizer.rules.InlineAssignIntoAggregateRule;
 import edu.uci.ics.asterix.optimizer.rules.IntroduceDynamicTypeCastRule;
 import edu.uci.ics.asterix.optimizer.rules.IntroduceSecondaryIndexInsertDeleteRule;
 import edu.uci.ics.asterix.optimizer.rules.IntroduceStaticTypeCastRule;
@@ -60,6 +59,7 @@
 import edu.uci.ics.hyracks.algebricks.rewriter.rules.ExtractGbyExpressionsRule;
 import edu.uci.ics.hyracks.algebricks.rewriter.rules.FactorRedundantGroupAndDecorVarsRule;
 import edu.uci.ics.hyracks.algebricks.rewriter.rules.InferTypesRule;
+import edu.uci.ics.hyracks.algebricks.rewriter.rules.InlineAssignIntoAggregateRule;
 import edu.uci.ics.hyracks.algebricks.rewriter.rules.InsertOuterJoinRule;
 import edu.uci.ics.hyracks.algebricks.rewriter.rules.InsertProjectBeforeUnionRule;
 import edu.uci.ics.hyracks.algebricks.rewriter.rules.IntroHashPartitionMergeExchange;
diff --git a/asterix-algebra/src/main/java/edu/uci/ics/asterix/optimizer/rules/InlineAssignIntoAggregateRule.java b/asterix-algebra/src/main/java/edu/uci/ics/asterix/optimizer/rules/InlineAssignIntoAggregateRule.java
deleted file mode 100644
index 5f98a1b..0000000
--- a/asterix-algebra/src/main/java/edu/uci/ics/asterix/optimizer/rules/InlineAssignIntoAggregateRule.java
+++ /dev/null
@@ -1,123 +0,0 @@
-package edu.uci.ics.asterix.optimizer.rules;
-
-import java.util.List;
-
-import org.apache.commons.lang3.mutable.Mutable;
-
-import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
-import edu.uci.ics.hyracks.algebricks.common.utils.Pair;
-import edu.uci.ics.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import edu.uci.ics.hyracks.algebricks.core.algebra.base.ILogicalOperator;
-import edu.uci.ics.hyracks.algebricks.core.algebra.base.ILogicalPlan;
-import edu.uci.ics.hyracks.algebricks.core.algebra.base.IOptimizationContext;
-import edu.uci.ics.hyracks.algebricks.core.algebra.base.LogicalOperatorTag;
-import edu.uci.ics.hyracks.algebricks.core.algebra.base.LogicalVariable;
-import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.ConstantExpression;
-import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.VariableReferenceExpression;
-import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator;
-import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.AggregateOperator;
-import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.AssignOperator;
-import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.GroupByOperator;
-import edu.uci.ics.hyracks.algebricks.core.algebra.visitors.AbstractConstVarFunVisitor;
-import edu.uci.ics.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule;
-
-
-
-public class InlineAssignIntoAggregateRule implements IAlgebraicRewriteRule {
-
-    @Override
-    public boolean rewritePre(Mutable<ILogicalOperator> opRef, IOptimizationContext context) {
-        return false;
-    }
-
-    @Override
-    public boolean rewritePost(Mutable<ILogicalOperator> opRef, IOptimizationContext context) throws AlgebricksException {
-        AbstractLogicalOperator op = (AbstractLogicalOperator) opRef.getValue();
-        if (op.getOperatorTag() != LogicalOperatorTag.GROUP) {
-            return false;
-        }
-        boolean changed = false;
-        GroupByOperator gbyOp = (GroupByOperator) op;
-        for (ILogicalPlan p : gbyOp.getNestedPlans()) {
-            for (Mutable<ILogicalOperator> r : p.getRoots()) {
-                if (inlined(r)) {
-                    changed = true;
-                }
-            }
-        }
-        return changed;
-    }
-
-    private boolean inlined(Mutable<ILogicalOperator> r) throws AlgebricksException {
-        AbstractLogicalOperator op1 = (AbstractLogicalOperator) r.getValue();
-        if (op1.getOperatorTag() != LogicalOperatorTag.AGGREGATE) {
-            return false;
-        }
-        AbstractLogicalOperator op2 = (AbstractLogicalOperator) op1.getInputs().get(0).getValue();
-        if (op2.getOperatorTag() != LogicalOperatorTag.ASSIGN) {
-            return false;
-        }
-        AggregateOperator agg = (AggregateOperator) op1;
-        AssignOperator assign = (AssignOperator) op2;
-        VarExprSubstitution ves = new VarExprSubstitution(assign.getVariables(), assign.getExpressions());
-        for (Mutable<ILogicalExpression> exprRef : agg.getExpressions()) {
-            ILogicalExpression expr = exprRef.getValue();
-            Pair<Boolean, ILogicalExpression> p = expr.accept(ves, null);
-            if (p.first == true) {
-                exprRef.setValue(p.second);
-            }
-            // AbstractLogicalExpression ale = (AbstractLogicalExpression) expr;
-            // ale.accept(ves, null);
-        }
-        List<Mutable<ILogicalOperator>> op1InpList = op1.getInputs();
-        op1InpList.clear();
-        op1InpList.add(op2.getInputs().get(0));
-        return true;
-    }
-
-    private class VarExprSubstitution extends AbstractConstVarFunVisitor<Pair<Boolean, ILogicalExpression>, Void> {
-
-        private List<LogicalVariable> variables;
-        private List<Mutable<ILogicalExpression>> expressions;
-
-        public VarExprSubstitution(List<LogicalVariable> variables, List<Mutable<ILogicalExpression>> expressions) {
-            this.variables = variables;
-            this.expressions = expressions;
-        }
-
-        @Override
-        public Pair<Boolean, ILogicalExpression> visitConstantExpression(ConstantExpression expr, Void arg) {
-            return new Pair<Boolean, ILogicalExpression>(false, expr);
-        }
-
-        @Override
-        public Pair<Boolean, ILogicalExpression> visitFunctionCallExpression(AbstractFunctionCallExpression expr,
-                Void arg) throws AlgebricksException {
-            boolean changed = false;
-            for (Mutable<ILogicalExpression> eRef : expr.getArguments()) {
-                ILogicalExpression e = eRef.getValue();
-                Pair<Boolean, ILogicalExpression> p = e.accept(this, arg);
-                if (p.first) {
-                    eRef.setValue(p.second);
-                    changed = true;
-                }
-            }
-            return new Pair<Boolean, ILogicalExpression>(changed, expr);
-        }
-
-        @Override
-        public Pair<Boolean, ILogicalExpression> visitVariableReferenceExpression(VariableReferenceExpression expr,
-                Void arg) {
-            LogicalVariable v = expr.getVariableReference();
-            int idx = variables.indexOf(v);
-            if (idx < 0) {
-                return new Pair<Boolean, ILogicalExpression>(false, expr);
-            } else {
-                return new Pair<Boolean, ILogicalExpression>(true, expressions.get(idx).getValue());
-            }
-
-        }
-
-    }
-}
diff --git a/asterix-app/data/events/tiny/event.adm b/asterix-app/data/events/tiny/event.adm
index 21fd7e7..5e9d4b3 100644
--- a/asterix-app/data/events/tiny/event.adm
+++ b/asterix-app/data/events/tiny/event.adm
@@ -5,8 +5,8 @@
     "sponsoring_sigs": [ { "sig_id": 14, "chapter_name": "San Clemente" }, 
                          { "sig_id": 14, "chapter_name": "Laguna Beach" } ],
     "interest_keywords": {{ "art", "landscape", "nature", "vernissage" }},
-    "start_time": datetime( "2011-02-23T18:00:00:000-08:00" ),
-    "end_time": datetime( "2011-02-23T21:00:00:000-08:00" ) 
+    "start_time": datetime( "2011-02-23T18:00:00.000-08:00" ),
+    "end_time": datetime( "2011-02-23T21:00:00.000-08:00" ) 
   }
   { 
     "event_id": 941, 
@@ -16,8 +16,8 @@
     "sponsoring_sigs": [ { "sig_id": 31, "chapter_name": "Huntington Beach" } ],
     "interest_keywords": {{ "scuba", "diving", "aquatics" }},
     "price": 40.00,
-    "start_time": datetime( "2010-10-16T09:00:00:000-08:00" ),
-    "end_time": datetime( "2010-10-16T12:00:00:000-08:00" )
+    "start_time": datetime( "2010-10-16T09:00:00.000-08:00" ),
+    "end_time": datetime( "2010-10-16T12:00:00.000-08:00" )
   }
   { 
     "event_id": 1042, 
@@ -26,7 +26,7 @@
     "sponsoring_sigs": [ { "sig_id": 14, "chapter_name": "Laguna Beach" } ],
     "interest_keywords": {{ "architecture", "photography" }},
     "price": 10.00,
-    "start_time": datetime( "2011-02-23T17:00:00:000-08:00" ),
-    "end_time": datetime( "2011-02-23T19:00:00:000-08:00" ) 
+    "start_time": datetime( "2011-02-23T17:00:00.000-08:00" ),
+    "end_time": datetime( "2011-02-23T19:00:00.000-08:00" ) 
   } 
   
\ No newline at end of file
diff --git a/asterix-app/data/nontagged/allData.json b/asterix-app/data/nontagged/allData.json
index e70257a..5f7bf3b 100644
--- a/asterix-app/data/nontagged/allData.json
+++ b/asterix-app/data/nontagged/allData.json
@@ -1,2 +1,2 @@
-{ "id": 10, "name": string("Nancy"), "age": 32.5f, "salary": 12.000 ,"married": boolean("true"), "interests": {{"reading", "writing"}}, "children": ["Brad", "Scott"],  "address": {  "number": 8389,  "street": "Hill St.",  "city": "Mountain View" }, "dob": date("-2011-01-27"), "time": time("12:20:30Z"), "datetime": datetime("-1951-12-27T12:20:30"),  "duration": duration("D10Y11M12DT10H50M30S"),  "location2d": point("41.00,44.00"),  "location3d": point3d("44.00,13.00,41.00"), "line" : line("10.1,11.1 10.2,11.2"), "polygon" : polygon("1.2,1.3 2.1,2.5 3.5,3.6 4.6,4.8"), "circle" : circle("10.1,11.1 10.2") }
+{ "id": 10, "name": string("Nancy"), "age": 32.5f, "salary": 12.000 ,"married": boolean("true"), "interests": {{"reading", "writing"}}, "children": ["Brad", "Scott"],  "address": {  "number": 8389,  "street": "Hill St.",  "city": "Mountain View" }, "dob": date("-2011-01-27"), "time": time("12:20:30Z"), "datetime": datetime("-1951-12-27T12:20:30"),  "duration": duration("P10Y11M12DT10H50M30S"),  "location2d": point("41.00,44.00"),  "location3d": point3d("44.00,13.00,41.00"), "line" : line("10.1,11.1 10.2,11.2"), "polygon" : polygon("1.2,1.3 2.1,2.5 3.5,3.6 4.6,4.8"), "circle" : circle("10.1,11.1 10.2") }
 
diff --git a/asterix-app/data/nontagged/tempData.json b/asterix-app/data/nontagged/tempData.json
index 1fef3ab..a40a254 100644
--- a/asterix-app/data/nontagged/tempData.json
+++ b/asterix-app/data/nontagged/tempData.json
@@ -1,2 +1,2 @@
-{ "id": 10, "date": date("2011-01-27"), "time": time("12:20:30"), "datetime": datetime("1951-12-27T12:20:30"),  "duration": duration("D30Y10M15DT10H30M50S"), "date2": date("2011-01-27-05:00"), "time2": time("12:20:30:999-05:00"), "datetime2": datetime("1951-12-27T12:20:30:250-08:45"),  "duration2": duration("D10M15DT10H50S"), "date3": date("-2011-01-27-05:00"), "time3": time("12:20:30:999Z"), "datetime3": datetime("-1951-12-27T12:20:30:250-08:15"),  "duration3": duration("-DT50S"), "date4": date("-2011-01-27Z"), "time4": time("12:20:30Z"), "datetime4": datetime("-1951-12-27T12:20:30:250Z"), "duration4": duration("-D10M"), "date5": date("2011-01-27"), "time5": time("12:20:30"), "datetime5": datetime("1951-12-27T12:20:30"),  "duration5": duration("D30Y10M15DT10H30M50S") }
+{ "id": 10, "date": date("2011-01-27"), "time": time("12:20:30"), "datetime": datetime("1951-12-27T12:20:30"),  "duration": duration("P30Y10M15DT10H30M50S"), "date2": date("2011-01-27"), "time2": time("12:20:30.999-05:00"), "datetime2": datetime("1951-12-27T12:20:30.250-08:45"),  "duration2": duration("P10M15DT10H50S"), "date3": date("-2011-01-27"), "time3": time("12:20:30.999Z"), "datetime3": datetime("-1951-12-27T12:20:30.250-08:15"),  "duration3": duration("-PT50S"), "date4": date("-2011-01-27"), "time4": time("12:20:30Z"), "datetime4": datetime("-1951-12-27T12:20:30.250Z"), "duration4": duration("-P10M"), "date5": date("2011-01-27"), "time5": time("12:20:30"), "datetime5": datetime("1951-12-27T12:20:30"),  "duration5": duration("P30Y10M15DT10H30M50S") }
 
diff --git a/asterix-app/data/nontagged/tempData.txt b/asterix-app/data/nontagged/tempData.txt
index 6615812..0afeb6f 100644
--- a/asterix-app/data/nontagged/tempData.txt
+++ b/asterix-app/data/nontagged/tempData.txt
@@ -1,4 +1,4 @@
-10|date("2011-01-27")|time("12:20:30")|datetime("1951-12-27T12:20:30")|duration("D30Y10M15DT10H30M50S")
-20|date("2011-01-27-05:00")|time("12:20:30:999-05:00")|datetime("1951-12-27T12:20:30:250-08:45")|duration("D10M15DT10H50S")
-30|date("-2011-01-27-05:00")|time("12:20:30:999Z")|datetime("-1951-12-27T12:20:30:250-08:15")|duration("-DT50S")
-40|date("-2011-01-27Z")|time("12:20:30Z")|datetime("-1951-12-27T12:20:30:250Z")|duration("-D10M")
+10|date("2011-01-27")|time("12:20:30")|datetime("1951-12-27T12:20:30")|duration("P30Y10M15DT10H30M50S")
+20|date("2011-01-27")|time("12:20:30.999-05:00")|datetime("1951-12-27T12:20:30.250-08:45")|duration("P10M15DT10H50S")
+30|date("-2011-01-27")|time("12:20:30.999Z")|datetime("-1951-12-27T12:20:30.250-08:15")|duration("-PT50S")
+40|date("-2011-01-27")|time("12:20:30Z")|datetime("-1951-12-27T12:20:30.250Z")|duration("-P10M")
diff --git a/asterix-app/src/test/resources/aqljts/results/nested_01.adm b/asterix-app/src/test/resources/aqljts/results/nested_01.adm
index 54444c7..27de5c0 100644
--- a/asterix-app/src/test/resources/aqljts/results/nested_01.adm
+++ b/asterix-app/src/test/resources/aqljts/results/nested_01.adm
@@ -30,4 +30,4 @@
 ARecordType: 
 field: t
 AbstractCollectionType: 
-ADateTime: { 2011-9-16:11:0:0:0:0:0 }
+ADateTime: { 2011-09-16T11:00:00.000Z }
diff --git a/asterix-app/src/test/resources/runtimets/queries/comparison/datetime_order.aql b/asterix-app/src/test/resources/runtimets/queries/comparison/datetime_order.aql
index 2e151ab..f2d8208 100644
--- a/asterix-app/src/test/resources/runtimets/queries/comparison/datetime_order.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/comparison/datetime_order.aql
@@ -11,7 +11,13 @@
 let $dt3 := datetime("2005-01-01T00:00:00+04:00")
 let $dt4 := datetime("2011-12-31T13:00:00-11:00")
 let $dt5 := datetime("2012-04-06T00:00:00Z")
+let $dt6 := datetime("-1937-07-07T23:00:00+08:00")
+let $dt7 := datetime("-1600-03-01T00:00:00.384+06:00")
+let $dt8 := datetime("-1600-02-29T23:59:59.999Z")
+let $dt9 := datetime("2000-02-29T23:59:59.999Z")
+let $dt10 := datetime("2000-03-01T01:59:59.999+07:00")
+let $dt11 := datetime("-1600-03-01T00:00:00.384-06:00")
 
-for $dt in [$dt1, $dt2, $dt3, $dt4, $dt5]
+for $dt in [$dt1, $dt2, $dt3, $dt4, $dt5, $dt6, $dt7, $dt8, $dt9, $dt10, $dt11]
 order by $dt
 return $dt
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/comparison/datetime_tzeq.aql b/asterix-app/src/test/resources/runtimets/queries/comparison/datetime_tzeq.aql
index e38bdae..1a0bb52 100644
--- a/asterix-app/src/test/resources/runtimets/queries/comparison/datetime_tzeq.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/comparison/datetime_tzeq.aql
@@ -8,6 +8,10 @@
 
 let $dt1 := datetime("2011-12-31T14:00:00-10:00")
 let $dt2 := datetime("2012-01-01T00:00:00Z")
+let $dt3 := datetime("2000-03-01T02:00:00+04:00")
+let $dt4 := datetime("2000-02-29T22:00:00Z")
+let $r1 := $dt1 = $dt2
+let $r2 := $dt3 = $dt4
 
 
-return [$dt1 = $dt2]
\ No newline at end of file
+return { "result1": $r1,"result2": $r2 }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/queries/constructor/date_01.aql b/asterix-app/src/test/resources/runtimets/queries/constructor/date_01.aql
index c889627..9bbfb9d 100644
--- a/asterix-app/src/test/resources/runtimets/queries/constructor/date_01.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/constructor/date_01.aql
@@ -4,12 +4,14 @@
 
 write output to nc1:"rttest/constructor_date_01.adm";
 
-let $c1 := date("2010-10-30+05:00")
-let $c2 := date("2010-10-30-10:15")
-let $c3 := date("1987-11-19")
-let $c4 := date("1987-11-19Z")
-let $c5 := date("-1987-11-19+08:30")
-let $c6 := date("0001-12-27")
-let $c7 := date("-1951-01-27-01:45")
-return {"date1": $c1, "date2": $c2, "date3": $c3, "date4": $c4, "date5": $c5, "date6": $c6, "date7": $c7}
+let $c1 := date("2010-10-30")
+let $c2 := date("1987-11-19")
+let $c3 := date("-1987-11-19")
+let $c4 := date("0001-12-27")
+let $c5 := date("-1951-12-27")
+let $c6 := date("-2043-11-19")
+let $c7 := date("-19280329")
+let $c8 := date("19280329")
+
+return {"date1": $c1, "date2": $c2, "date3": $c3, "date4": $c4, "date5": $c5, "date6": $c6, "date7": $c7, "date8": $c8}
 
diff --git a/asterix-app/src/test/resources/runtimets/queries/constructor/datetime_01.aql b/asterix-app/src/test/resources/runtimets/queries/constructor/datetime_01.aql
index 611feff..c4163d8 100644
--- a/asterix-app/src/test/resources/runtimets/queries/constructor/datetime_01.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/constructor/datetime_01.aql
@@ -1,13 +1,22 @@
+drop dataverse test if exists;
+create dataverse test;
 use dataverse test;
 
 write output to nc1:"rttest/constructor_datetime_01.adm";
 
-let $c1 := datetime("2010-10-30T10:50:56:999+05:45")
-let $c2 := datetime("2010-10-30T10:30:56:250-10:00")
-let $c3 := datetime("1987-11-19T09:20:00:200")
+let $c1 := datetime("2010-10-30T10:50:56.999+05:45")
+let $c2 := datetime("2010-10-30T10:30:56.250-10:00")
+let $c3 := datetime("1987-11-19T09:20:00.200Z")
 let $c4 := datetime("1987-11-19T10:50:56Z")
-let $c5 := datetime("-1987-11-19T10:50:56:099-05:30")
-let $c6 := datetime("-0001-11-19T10:50:56:719Z")
-let $c7 := datetime("1951-12-27T12:20:15")
-return {"datetime1": $c1, "datetime2": $c2, "datetime3": $c3, "datetime4": $c4, "datetime5": $c5, "datetime6": $c6, "datetime7": $c7}
+let $c5 := datetime("-1987-11-19T10:50:56.099-05:30")
+let $c6 := datetime("-0001-11-19T10:50:56.719Z")
+let $c7 := datetime("1951-12-27T12:20:15Z")
+let $c8 := datetime("2043-11-19T10:50:56.719Z")
+let $c9 := datetime("-19280329T174937374-0630")
+let $c10 := datetime("-19280329T174937374+0630")
+let $c11 := datetime("-19280329T174937374")
+let $c12 := datetime("-19280329T174937374+0630")
+let $c13 := datetime("-19280329T17493737+0630")
+let $c14 := datetime("-19280301T05493737+0630")
+return {"datetime1": $c1, "datetime2": $c2, "datetime3": $c3, "datetime4": $c4, "datetime5": $c5, "datetime6": $c6, "datetime7": $c7, "datetime8": $c8, "datetime9": $c9, "datetime10": $c10, "datetime11": $c11, "datetime12": $c12, "datetime13": $c13, "datetime14": $c14}
 
diff --git a/asterix-app/src/test/resources/runtimets/queries/constructor/duration_01.aql b/asterix-app/src/test/resources/runtimets/queries/constructor/duration_01.aql
index 011996c..59a3634 100644
--- a/asterix-app/src/test/resources/runtimets/queries/constructor/duration_01.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/constructor/duration_01.aql
@@ -4,13 +4,17 @@
 
 write output to nc1:"rttest/constructor_duration_01.adm";
 
-let $c1 := duration("D30Y10M25DT13H12M50S")
-let $c2 := duration("D25DT13H12M50S")
-let $c3 := duration("DT13H12M50S")
-let $c4 := duration("D30YT12MS")
-let $c5 := duration("DT13H")
-let $c6 := duration("-D30Y10M25DT13H12M50S")
-let $c7 := duration("-D25DT13H12M50S")
-let $c8 := duration("-DT13H50S")
-return {"duration1": $c1, "duration2": $c2, "duration3": $c3, "duration4": $c4, "duration5": $c5, "duration6": $c6, "duration7": $c7, "duration8": $c8}
+let $c1 := duration("P30Y10M25DT13H12M50S")
+let $c2 := duration("P25DT13H12M50S")
+let $c3 := duration("PT13H12M50S")
+let $c4 := duration("P30YT12MS")
+let $c5 := duration("PT13H")
+let $c6 := duration("-P30Y10M25DT13H12M50S")
+let $c7 := duration("-P25DT13H12M50S")
+let $c8 := duration("-PT13H50S")
+let $c9 := duration("P120D")
+let $c10 := duration("-P28M")
+let $c11 := duration("PT29M90.937S")
+let $c12 := duration("P300Y15M60DT300H98M482.435S")
+return {"duration1": $c1, "duration2": $c2, "duration3": $c3, "duration4": $c4, "duration5": $c5, "duration6": $c6, "duration7": $c7, "duration8": $c8, "duration9": $c9, "duration10": $c10, "duration11": $c11, "duration12": $c12}
 
diff --git a/asterix-app/src/test/resources/runtimets/queries/constructor/time_01.aql b/asterix-app/src/test/resources/runtimets/queries/constructor/time_01.aql
index caa90f0..4a040a1 100644
--- a/asterix-app/src/test/resources/runtimets/queries/constructor/time_01.aql
+++ b/asterix-app/src/test/resources/runtimets/queries/constructor/time_01.aql
@@ -4,12 +4,16 @@
 
 write output to nc1:"rttest/constructor_time_01.adm";
 
-let $c1 := time("10:50:56:200+05:00")
-let $c2 := time("10:50:56:200-10:15")
+let $c1 := time("10:50:56.200+05:00")
+let $c2 := time("10:50:56.200-10:15")
 let $c3 := time("10:50:56")
-let $c4 := time("10:50:56:200Z")
-let $c5 := time("23:59:59:999-13:30")
-let $c6 := time("24:00:00:000+14:45")
-let $c7 := time("12:59:00:019-01:00")
-return {"time1": $c1, "time2": $c2, "time3": $c3, "time4": $c4, "time5": $c5, "time6": $c6, "time7": $c7}
+let $c4 := time("10:50:56.200Z")
+let $c5 := time("23:59:59.999-13:30")
+let $c6 := time("00:00:00.000+14:45")
+let $c7 := time("12:59:00.019-01:00")
+let $c8 := time("12:59:00.01-01:00")
+let $c9 := time("12:59:00.019-01:00")
+let $c10 := time("12590001-0100")
+let $c11 := time("125900019-0100")
+return {"time1": $c1, "time2": $c2, "time3": $c3, "time4": $c4, "time5": $c5, "time6": $c6, "time7": $c7, "time8": $c8, "time9": $c9, "time10": $c10, "time11": $c11}
 
diff --git a/asterix-app/src/test/resources/runtimets/queries/dml/insert-src-dst-01.aql b/asterix-app/src/test/resources/runtimets/queries/dml/insert-src-dst-01.aql
new file mode 100644
index 0000000..c3dc7ba
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/dml/insert-src-dst-01.aql
@@ -0,0 +1,40 @@
+/*
+ * Description     : Insert from source dataset into target dataset
+ * Expected Result : Success
+ * Date            : 25th July 2012
+ * Issue #         : Issue 76
+ */
+
+drop dataverse testdv2 if exists;
+create dataverse testdv2;
+use dataverse testdv2;
+
+write output to nc1:"rttest/dml_insert-src-dst-01.adm";
+
+create type testtype01 as closed {
+  id: string,
+  name: string?
+}
+
+create type testtype02 as closed {
+  id: string
+}
+
+create dataset testds01(testtype01) partitioned by key id;
+create dataset testds02(testtype02) partitioned by key id;
+
+insert into dataset testds01 ({ "id": "001" });
+insert into dataset testds01 ({ "id": "002", "name": "John Doe" });
+
+insert into dataset testds02 ({ "id": "003" });
+insert into dataset testds02 ({ "id": "004" });
+insert into dataset testds02 ({ "id": "005" });
+
+insert into dataset testds01(
+for $d in dataset("testds02")
+return $d
+);
+
+for $d in dataset("testds01")
+order by $d.id
+return $d
diff --git a/asterix-app/src/test/resources/runtimets/queries/flwor/for17.aql b/asterix-app/src/test/resources/runtimets/queries/flwor/for17.aql
new file mode 100644
index 0000000..9e05da3
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/flwor/for17.aql
@@ -0,0 +1,11 @@
+/*
+ * Description     : Test union of two lists
+ * Expected Result : Success
+ * Date            : 24th July 2012
+ */
+
+(for $a in [{"id":1234,"name":"John Doe","age":56,"salary":50000,"dept":"HR"}]
+return $a)
+union
+(for $b in [{"id":3424,"name":"Roger Sanders","age":46,"salary":60000,"dept":"Publishing"}]
+return $b)
diff --git a/asterix-app/src/test/resources/runtimets/queries/flwor/let28.aql b/asterix-app/src/test/resources/runtimets/queries/flwor/let28.aql
new file mode 100644
index 0000000..2f1b7ce
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/flwor/let28.aql
@@ -0,0 +1,8 @@
+/*
+ * Description     : Test let clause and floating point literals
+ * Expected Result : Success
+ * Date            : 24th July 2012
+ */
+
+let $a := [137.8932f,156f,.98781f, 436.219F,.89217F,16789F]
+return $a
diff --git a/asterix-app/src/test/resources/runtimets/queries/flwor/let29.aql b/asterix-app/src/test/resources/runtimets/queries/flwor/let29.aql
new file mode 100644
index 0000000..55d6319
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/flwor/let29.aql
@@ -0,0 +1,8 @@
+/*
+ * Description     : Test let clause and double literals
+ * Expected Result : Success
+ * Date            : 24th July 2012
+ */
+
+let $a := [137.8932,.98781,436.219,.89217,-234.324]
+return $a
diff --git a/asterix-app/src/test/resources/runtimets/queries/flwor/let30.aql b/asterix-app/src/test/resources/runtimets/queries/flwor/let30.aql
new file mode 100644
index 0000000..eebc11f
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/flwor/let30.aql
@@ -0,0 +1,12 @@
+/*
+ * Description     : Test union of two lists, bind each list to a variable
+ * Expected Result : Success
+ * Date            : 24th July 2012
+ */
+
+// $a and $b are ordered lists with one Record each.
+
+let $a := [{"id":1234,"name":"John Doe","age":56,"salary":50000,"dept":"HR"}]
+let $b := [{"id":3424,"name":"Roger Sanders","age":46,"salary":60000,"dept":"Publishing"}]
+let $c := $a union $b
+return $c
diff --git a/asterix-app/src/test/resources/runtimets/queries/flwor/let31.aql b/asterix-app/src/test/resources/runtimets/queries/flwor/let31.aql
new file mode 100644
index 0000000..84ac278
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/flwor/let31.aql
@@ -0,0 +1,12 @@
+/*
+ * Description     : Test union of two lists, bind each list to a variable
+ * Expected Result : Success
+ * Date            : 24th July 2012
+ */
+
+// $a and $b hold one Record each.
+
+let $a := {"id":1234,"name":"John Doe","age":56,"salary":50000,"dept":"HR"}
+let $b := {"id":3424,"name":"Roger Sanders","age":46,"salary":60000,"dept":"Publishing"}
+let $c := $a union $b
+return $c
diff --git a/asterix-app/src/test/resources/runtimets/queries/flwor/let32.aql b/asterix-app/src/test/resources/runtimets/queries/flwor/let32.aql
new file mode 100644
index 0000000..0881fde
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/flwor/let32.aql
@@ -0,0 +1,11 @@
+/*
+ * Description     : Test union of two lists, bind each list to a variable
+ * Expected Result : Success
+ * Date            : 24th July 2012
+ */
+
+let $m := (for $a in [{"id":1234,"name":"John Doe","age":56,"salary":50000,"dept":"HR"}]
+return $a)
+let $n := (for $b in [{"id":3424,"name":"Roger Sanders","age":46,"salary":60000,"dept":"Publishing"}]
+return $b)
+return $m union $n
diff --git a/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-01.aql b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-01.aql
new file mode 100644
index 0000000..a5aec23
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-01.aql
@@ -0,0 +1,9 @@
+/*
+ * Description     : Test order by clause of FLWOR
+ * Expected Result : Success
+ * Date            : 24th July 2012
+ */
+
+for $a in ["two","four","six","eight","ten","twenty","undo"]
+order by $a desc
+return $a
diff --git a/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-02.aql b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-02.aql
new file mode 100644
index 0000000..4cc087c
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-02.aql
@@ -0,0 +1,9 @@
+/*
+ * Description     : Test order by clause of FLWOR
+ * Expected Result : Success
+ * Date            : 24th July 2012
+ */
+
+for $a in ["two","four","six","eight","ten","twenty","undo"]
+order by $a asc
+return $a
diff --git a/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-03.aql b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-03.aql
new file mode 100644
index 0000000..3792c74
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-03.aql
@@ -0,0 +1,9 @@
+/*
+ * Description     : Test order by clause of FLWOR
+ * Expected Result : Success
+ * Date            : 24th July 2012
+ */
+
+for $b in ["ten","twenty","thirty","forty","fifty","sixty","seventy","ninety"]
+order by string-concat([$b,"test"]) asc
+return string-concat([$b,"test"])
diff --git a/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-04.aql b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-04.aql
new file mode 100644
index 0000000..e7a209b
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-04.aql
@@ -0,0 +1,9 @@
+/*
+ * Description     : Test order by clause of FLWOR
+ * Expected Result : Success
+ * Date            : 24th July 2012
+ */
+
+for $b in ["ten","twenty","thirty","forty","fifty","sixty","seventy","ninety"]
+order by string-concat([$b,"test"]) desc
+return string-concat([$b,"test"])
diff --git a/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-05.aql b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-05.aql
new file mode 100644
index 0000000..c3139f5
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-05.aql
@@ -0,0 +1,9 @@
+/*
+ * Description     : Test order by clause of FLWOR
+ * Expected Result : Success
+ * Date            : 24th July 2012
+ */
+
+for $b in ["ten","twenty","thirty","forty","fifty","sixty","seventy","ninety"]
+order by string-concat([$b,""]) desc
+return string-concat([$b,""])
diff --git a/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-06.aql b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-06.aql
new file mode 100644
index 0000000..791af3a
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-06.aql
@@ -0,0 +1,9 @@
+/*
+ * Description     : Test order by clause of FLWOR
+ * Expected Result : Success
+ * Date            : 24th July 2012
+ */
+
+for $b in ["ten","twenty","thirty","forty","fifty","sixty","seventy","ninety"]
+order by string-concat([$b,""]) asc
+return string-concat([$b,""])
diff --git a/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-07.aql b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-07.aql
new file mode 100644
index 0000000..9c85780
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-07.aql
@@ -0,0 +1,9 @@
+/*
+ * Description     : Test order by clause of FLWOR
+ * Expected Result : Success
+ * Date            : 24th July 2012
+ */
+
+for $b in ["ten","twenty","thirty","forty","fifty","sixty","seventy","ninety"]
+order by string-concat(["",$b]) desc
+return string-concat(["",$b])
diff --git a/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-08.aql b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-08.aql
new file mode 100644
index 0000000..6a823c8
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-08.aql
@@ -0,0 +1,9 @@
+/*
+ * Description     : Test order by clause of FLWOR
+ * Expected Result : Success
+ * Date            : 24th July 2012
+ */
+
+for $b in ["ten","twenty","thirty","forty","fifty","sixty","seventy","ninety"]
+order by string-concat(["",$b]) asc
+return string-concat(["",$b])
diff --git a/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-09.aql b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-09.aql
new file mode 100644
index 0000000..0df3a9e
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-09.aql
@@ -0,0 +1,9 @@
+/*
+ * Description     : Test order by clause of FLWOR
+ * Expected Result : Success
+ * Date            : 24th July 2012
+ */
+
+for $x in ["ten","twenty","thirty","forty","fifty","sixty","seventy","ninety"]
+order by string-concat([$x,$x]) asc 
+return string-concat([$x,$x])
diff --git a/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-10.aql b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-10.aql
new file mode 100644
index 0000000..09a9026
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-10.aql
@@ -0,0 +1,9 @@
+/*
+ * Description     : Test order by clause of FLWOR
+ * Expected Result : Success
+ * Date            : 24th July 2012
+ */
+
+for $x in ["ten","twenty","thirty","forty","fifty","sixty","seventy","ninety"]
+order by string-concat([$x,$x]) desc 
+return string-concat([$x,$x])
diff --git a/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-11.aql b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-11.aql
new file mode 100644
index 0000000..5b79987
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-11.aql
@@ -0,0 +1,9 @@
+/*
+ * Description     : Test order by clause of FLWOR
+ * Expected Result : Success
+ * Date            : 24th July 2012
+ */
+
+for $x in [1,3,4,5,2,3,33,55,43,12,34,45,67,66,89,0,-1,999]
+order by ($x+$x) asc
+return ($x+$x)
diff --git a/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-12.aql b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-12.aql
new file mode 100644
index 0000000..b620a05
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/flwor/order-by-12.aql
@@ -0,0 +1,9 @@
+/*
+ * Description     : Test order by clause of FLWOR
+ * Expected Result : Success
+ * Date            : 24th July 2012
+ */
+
+for $x in [[1,3,4],[5,2],[3,33,55],[43,12,34],[45,67],[66,89,0],[-1,999]]
+order by len($x)
+return { "x":$x,"len($x)":len($x) }
diff --git a/asterix-app/src/test/resources/runtimets/queries/flwor/ret-01.aql b/asterix-app/src/test/resources/runtimets/queries/flwor/ret-01.aql
new file mode 100644
index 0000000..0c7e73e
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/flwor/ret-01.aql
@@ -0,0 +1,8 @@
+/*
+ * Description      :  Test return clause of the FLWOR expression
+ * Expected Result  :  Success
+ * Date             :  7th July 2012
+ */
+
+for $x in ["ten","twenty","thirty","forty","fifty","sixty","seventy","ninety"]
+return string-length($x)
diff --git a/asterix-app/src/test/resources/runtimets/results/comparison/datetime_order.adm b/asterix-app/src/test/resources/runtimets/results/comparison/datetime_order.adm
index 14f3ab1..21f8208 100644
--- a/asterix-app/src/test/resources/runtimets/results/comparison/datetime_order.adm
+++ b/asterix-app/src/test/resources/runtimets/results/comparison/datetime_order.adm
@@ -1,5 +1,11 @@
-datetime("2005-01-01T00:00:00:000+04:00")
-datetime("2012-01-01T00:00:00:000+00:00")
-datetime("2011-12-31T14:00:00:000-10:00")
-datetime("2011-12-31T13:00:00:000-11:00")
-datetime("2012-04-06T00:00:00:000+00:00")
+datetime("-1937-07-07T15:00:00.000Z")
+datetime("-1600-02-29T18:00:00.384Z")
+datetime("-1600-02-29T23:59:59.999Z")
+datetime("-1600-03-01T06:00:00.384Z")
+datetime("2000-02-29T18:59:59.999Z")
+datetime("2000-02-29T23:59:59.999Z")
+datetime("2004-12-31T20:00:00.000Z")
+datetime("2012-01-01T00:00:00.000Z")
+datetime("2012-01-01T00:00:00.000Z")
+datetime("2012-01-01T00:00:00.000Z")
+datetime("2012-04-06T00:00:00.000Z")
diff --git a/asterix-app/src/test/resources/runtimets/results/comparison/datetime_tzeq.adm b/asterix-app/src/test/resources/runtimets/results/comparison/datetime_tzeq.adm
index 5dc225e..167bafb 100644
--- a/asterix-app/src/test/resources/runtimets/results/comparison/datetime_tzeq.adm
+++ b/asterix-app/src/test/resources/runtimets/results/comparison/datetime_tzeq.adm
@@ -1 +1 @@
-[ true ]
+{ "result1": true, "result2": true }
diff --git a/asterix-app/src/test/resources/runtimets/results/constructor/date_01.adm b/asterix-app/src/test/resources/runtimets/results/constructor/date_01.adm
index b0cb1e4..2a90c4d 100644
--- a/asterix-app/src/test/resources/runtimets/results/constructor/date_01.adm
+++ b/asterix-app/src/test/resources/runtimets/results/constructor/date_01.adm
@@ -1 +1 @@
-{ "date1": date("2010-10-30+05:00"), "date2": date("2010-10-30-10:15"), "date3": date("1987-11-19+00:00"), "date4": date("1987-11-19+00:00"), "date5": date("-1987-11-19+08:30"), "date6": date("0001-12-27+00:00"), "date7": date("-1951-01-27-01:45") }
\ No newline at end of file
+{ "date1": date("2010-10-30"), "date2": date("1987-11-19"), "date3": date("-1987-11-19"), "date4": date("0001-12-27"), "date5": date("-1951-12-27"), "date6": date("-2043-11-19"), "date7": date("-1928-03-29"), "date8": date("1928-03-29") }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/constructor/datetime_01.adm b/asterix-app/src/test/resources/runtimets/results/constructor/datetime_01.adm
index 30d2cdb..54e76c4 100644
--- a/asterix-app/src/test/resources/runtimets/results/constructor/datetime_01.adm
+++ b/asterix-app/src/test/resources/runtimets/results/constructor/datetime_01.adm
@@ -1 +1 @@
-{ "datetime1": datetime("2010-10-30T10:50:56:980+05:45"), "datetime2": datetime("2010-10-30T10:30:56:240-10:00"), "datetime3": datetime("1987-11-19T09:20:00:200+00:00"), "datetime4": datetime("1987-11-19T10:50:56:000+00:00"), "datetime5": datetime("-1987-11-19T10:50:56:080-05:30"), "datetime6": datetime("-0001-11-19T10:50:56:700+00:00"), "datetime7": datetime("1951-12-27T12:20:15:000+00:00") }
+{ "datetime1": datetime("2010-10-30T05:05:56.999Z"), "datetime2": datetime("2010-10-30T20:30:56.250Z"), "datetime3": datetime("1987-11-19T09:20:00.200Z"), "datetime4": datetime("1987-11-19T10:50:56.000Z"), "datetime5": datetime("-1987-11-19T16:20:56.099Z"), "datetime6": datetime("-0001-11-19T10:50:56.719Z"), "datetime7": datetime("1951-12-27T12:20:15.000Z"), "datetime8": datetime("2043-11-19T10:50:56.719Z"), "datetime9": datetime("-1928-03-30T00:19:37.374Z"), "datetime10": datetime("-1928-03-29T11:19:37.374Z"), "datetime11": datetime("-1928-03-29T17:49:37.374Z"), "datetime12": datetime("-1928-03-29T11:19:37.374Z"), "datetime13": datetime("-1928-03-29T11:19:37.370Z"), "datetime14": datetime("-1928-02-29T23:19:37.370Z") }
diff --git a/asterix-app/src/test/resources/runtimets/results/constructor/duration_01.adm b/asterix-app/src/test/resources/runtimets/results/constructor/duration_01.adm
index b80ed1a..3a9cbb7 100644
--- a/asterix-app/src/test/resources/runtimets/results/constructor/duration_01.adm
+++ b/asterix-app/src/test/resources/runtimets/results/constructor/duration_01.adm
@@ -1 +1 @@
-{ "duration1": duration("D30Y10M25DT13H12M50S"), "duration2": duration("D0Y0M25DT13H12M50S"), "duration3": duration("D0Y0M0DT13H12M50S"), "duration4": duration("D30Y0M0DT0H12M0S"), "duration5": duration("D0Y0M0DT13H0M0S"), "duration6": duration("-D30Y10M25DT13H12M50S"), "duration7": duration("-D0Y0M25DT13H12M50S"), "duration8": duration("-D0Y0M0DT13H0M50S") }
+{ "duration1": duration("P30Y10M25DT13H12M50S"), "duration2": duration("P25DT13H12M50S"), "duration3": duration("PT13H12M50S"), "duration4": duration("P30YT12M"), "duration5": duration("PT13H"), "duration6": duration("-P30Y10M25DT13H12M50S"), "duration7": duration("-P25DT13H12M50S"), "duration8": duration("-PT13H50S"), "duration9": duration("P120D"), "duration10": duration("-P2Y4M"), "duration11": duration("PT30M30.937S"), "duration12": duration("P301Y3M72DT13H46M2.435S") }
diff --git a/asterix-app/src/test/resources/runtimets/results/constructor/time_01.adm b/asterix-app/src/test/resources/runtimets/results/constructor/time_01.adm
index 2c932b5..ef6adc9 100644
--- a/asterix-app/src/test/resources/runtimets/results/constructor/time_01.adm
+++ b/asterix-app/src/test/resources/runtimets/results/constructor/time_01.adm
@@ -1 +1 @@
-{ "time1": time("10:50:56:200+05:00"), "time2": time("10:50:56:200-10:15"), "time3": time("10:50:56:000+00:00"), "time4": time("10:50:56:200+00:00"), "time5": time("23:59:59:980-13:30"), "time6": time("24:00:00:000+14:45"), "time7": time("12:59:00:000-01:00") }
+{ "time1": time("05:50:56.200Z"), "time2": time("21:05:56.200Z"), "time3": time("10:50:56.000Z"), "time4": time("10:50:56.200Z"), "time5": time("13:29:59.999Z"), "time6": time("09:15:00.000Z"), "time7": time("13:59:00.019Z"), "time8": time("13:59:00.010Z"), "time9": time("13:59:00.019Z"), "time10": time("13:59:00.010Z"), "time11": time("13:59:00.019Z") }
diff --git a/asterix-app/src/test/resources/runtimets/results/dml/insert-src-dst-01.adm b/asterix-app/src/test/resources/runtimets/results/dml/insert-src-dst-01.adm
new file mode 100644
index 0000000..70b6b95
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/results/dml/insert-src-dst-01.adm
@@ -0,0 +1,5 @@
+{ "id": "001", "name": null }
+{ "id": "002", "name": "John Doe" }
+{ "id": "003", "name": null }
+{ "id": "004", "name": null }
+{ "id": "005", "name": null }
diff --git a/asterix-app/src/test/resources/runtimets/results/scan/alltypes_01.adm b/asterix-app/src/test/resources/runtimets/results/scan/alltypes_01.adm
index 3fad2e3..64aee7c 100644
--- a/asterix-app/src/test/resources/runtimets/results/scan/alltypes_01.adm
+++ b/asterix-app/src/test/resources/runtimets/results/scan/alltypes_01.adm
@@ -1 +1 @@
-{ "id": 10, "name": "Nancy", "age": 32.5f, "salary": 12.0d, "married": true, "interests": {{ "reading", "writing" }}, "children": [ "Brad", "Scott" ], "address": { "number": 8389, "street": "Hill St.", "city": "Mountain View" }, "dob": date("-2011-01-27+00:00"), "time": time("12:20:30:000+00:00"), "datetime": datetime("-1951-12-27T12:20:30:000+00:00"), "duration": duration("D10Y11M12DT10H50M30S"), "location2d": point("41.0,44.0"), "location3d": point3d("44.0,13.0,41.0"), "line": line("10.1,11.1 10.2,11.2"), "polygon": polygon("1.2,1.3 2.1,2.5 3.5,3.6 4.6,4.8"), "circle": circle("10.1,11.1 10.2") }
+{ "id": 10, "name": "Nancy", "age": 32.5f, "salary": 12.0d, "married": true, "interests": {{ "reading", "writing" }}, "children": [ "Brad", "Scott" ], "address": { "number": 8389, "street": "Hill St.", "city": "Mountain View" }, "dob": date("-2011-01-27"), "time": time("12:20:30.000Z"), "datetime": datetime("-1951-12-27T12:20:30.000Z"), "duration": duration("P10Y11M12DT10H50M30S"), "location2d": point("41.0,44.0"), "location3d": point3d("44.0,13.0,41.0"), "line": line("10.1,11.1 10.2,11.2"), "polygon": polygon("1.2,1.3 2.1,2.5 3.5,3.6 4.6,4.8"), "circle": circle("10.1,11.1 10.2") }
diff --git a/asterix-app/src/test/resources/runtimets/results/scan/temp_types_01.adm b/asterix-app/src/test/resources/runtimets/results/scan/temp_types_01.adm
index 013a0cb..4ad4f1c 100644
--- a/asterix-app/src/test/resources/runtimets/results/scan/temp_types_01.adm
+++ b/asterix-app/src/test/resources/runtimets/results/scan/temp_types_01.adm
@@ -1 +1 @@
-{ "id": 10, "date": date("2011-01-27+00:00"), "time": time("12:20:30:000+00:00"), "datetime": datetime("1951-12-27T12:20:30:000+00:00"), "duration": duration("D30Y10M15DT10H30M50S"), "date2": date("2011-01-27-05:00"), "time2": time("12:20:30:980-05:00"), "datetime2": datetime("1951-12-27T12:20:30:240-08:45"), "duration2": duration("D0Y10M15DT10H0M50S"), "date3": date("-2011-01-27-05:00"), "time3": time("12:20:30:980+00:00"), "datetime3": datetime("-1951-12-27T12:20:30:240-08:15"), "duration3": duration("-D0Y0M0DT0H0M50S"), "date4": date("-2011-01-27+00:00"), "time4": time("12:20:30:000+00:00"), "datetime4": datetime("-1951-12-27T12:20:30:240+00:00"), "duration4": duration("-D0Y10M0DT0H0M0S"), "date5": date("2011-01-27+00:00"), "time5": time("12:20:30:000+00:00"), "datetime5": datetime("1951-12-27T12:20:30:000+00:00"), "duration5": duration("D30Y10M15DT10H30M50S") }
\ No newline at end of file
+{ "id": 10, "date": date("2011-01-27"), "time": time("12:20:30.000Z"), "datetime": datetime("1951-12-27T12:20:30.000Z"), "duration": duration("P30Y10M15DT10H30M50S"), "date2": date("2011-01-27"), "time2": time("17:20:30.999Z"), "datetime2": datetime("1951-12-27T21:05:30.250Z"), "duration2": duration("P10M15DT10H50S"), "date3": date("-2011-01-27"), "time3": time("12:20:30.999Z"), "datetime3": datetime("-1951-12-27T20:35:30.250Z"), "duration3": duration("-PT50S"), "date4": date("-2011-01-27"), "time4": time("12:20:30.000Z"), "datetime4": datetime("-1951-12-27T12:20:30.250Z"), "duration4": duration("-P10M"), "date5": date("2011-01-27"), "time5": time("12:20:30.000Z"), "datetime5": datetime("1951-12-27T12:20:30.000Z"), "duration5": duration("P30Y10M15DT10H30M50S") }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/scan/temp_types_02.adm b/asterix-app/src/test/resources/runtimets/results/scan/temp_types_02.adm
index f87b1e5..f0b6815 100644
--- a/asterix-app/src/test/resources/runtimets/results/scan/temp_types_02.adm
+++ b/asterix-app/src/test/resources/runtimets/results/scan/temp_types_02.adm
@@ -1,4 +1,4 @@
-{ "id": 10, "date": date("2011-01-27+00:00"), "time": time("12:20:30:000+00:00"), "datetime": datetime("1951-12-27T12:20:30:000+00:00"), "duration": duration("D30Y10M15DT10H30M50S") }
-{ "id": 20, "date": date("2011-01-27-05:00"), "time": time("12:20:30:980-05:00"), "datetime": datetime("1951-12-27T12:20:30:240-08:45"), "duration": duration("D0Y10M15DT10H0M50S") }
-{ "id": 30, "date": date("-2011-01-27-05:00"), "time": time("12:20:30:980+00:00"), "datetime": datetime("-1951-12-27T12:20:30:240-08:15"), "duration": duration("-D0Y0M0DT0H0M50S") }
-{ "id": 40, "date": date("-2011-01-27+00:00"), "time": time("12:20:30:000+00:00"), "datetime": datetime("-1951-12-27T12:20:30:240+00:00"), "duration": duration("-D0Y10M0DT0H0M0S") }
+{ "id": 10, "date": date("2011-01-27"), "time": time("12:20:30.000Z"), "datetime": datetime("1951-12-27T12:20:30.000+00:00"), "duration": duration("P30Y10M15DT10H30M50S") }
+{ "id": 20, "date": date("2011-01-27"), "time": time("17:20:30.999Z"), "datetime": datetime("1951-12-27T12:20:30.240-08:45"), "duration": duration("P10M15DT10H50S") }
+{ "id": 30, "date": date("-2011-01-27"), "time": time("12:20:30.999Z"), "datetime": datetime("-1951-12-27T12:20:30.240-08:15"), "duration": duration("-PT50S") }
+{ "id": 40, "date": date("-2011-01-27"), "time": time("12:20:30.000Z"), "datetime": datetime("-1951-12-27T12:20:30.240+00:00"), "duration": duration("-P10M") }
diff --git a/asterix-aql/src/main/javacc/AQL.jj b/asterix-aql/src/main/javacc/AQL.jj
index 0767c4e..3e63b35 100644
--- a/asterix-aql/src/main/javacc/AQL.jj
+++ b/asterix-aql/src/main/javacc/AQL.jj
@@ -598,7 +598,7 @@
     	itemTypeName = new Identifier(token.image);
   	}
   	< RIGHTPAREN >
-  )?
+  )
   {
   	  if(datasetType == DatasetType.INTERNAL) {
       	idd = InternalDatasetDeclaration();
@@ -860,6 +860,7 @@
   )?
   "as"
   ( typeExpr = TypeExpr() )
+  (";")?
   {
     long numValues = -1;
     String filename = null;
@@ -1143,11 +1144,12 @@
 }
 {
     expr = Expression()
-
+    (";")?
     {
       query.setBody(expr);
       return query;
     }
+     
 }
 
 
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/comparators/ADateTimeAscBinaryComparatorFactory.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/comparators/ADateTimeAscBinaryComparatorFactory.java
index b62c21a..2dd8785 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/comparators/ADateTimeAscBinaryComparatorFactory.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/comparators/ADateTimeAscBinaryComparatorFactory.java
@@ -1,6 +1,5 @@
 package edu.uci.ics.asterix.dataflow.data.nontagged.comparators;
 
-import edu.uci.ics.asterix.om.base.AMutableDateTime;
 import edu.uci.ics.hyracks.api.dataflow.value.IBinaryComparator;
 import edu.uci.ics.hyracks.api.dataflow.value.IBinaryComparatorFactory;
 
@@ -15,41 +14,27 @@
     @Override
     public IBinaryComparator createBinaryComparator() {
         return new IBinaryComparator() {
-        	
-            private AMutableDateTime dt1 = new AMutableDateTime(0, 0, 0, 0, 0, 0, 0, 0, 0);
-            private AMutableDateTime dt2 = new AMutableDateTime(0, 0, 0, 0, 0, 0, 0, 0, 0);
 
             @Override
             public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) {
-                short year = (short) (((b1[s1] & 0xff) << 8) | b1[s1 + 1] & 0xff);
-                int time = ((b1[s1 + 4] & 0xff) << 24) | ((b1[s1 + 5] & 0xff) << 16) | ((b1[s1 + 6] & 0xff) << 8)
-                        | (b1[s1 + 7] & 0xff);
 
-                dt1.setValue(year >> 1, // year
-                        (year & 0x0001) * 8 + ((b1[s1 + 2] >>> 5) & 0x07), // month
-                        b1[s1 + 2] & 0x1f, // day
-                        (short) ((time) * 20 % 216000000 / 3600000), // hour
-                        (short) ((time) * 20 % 3600000 / 60000), // minutes
-                        (short) ((time) * 20 % 60000 / 1000), // seconds
-                        (short) ((time) * 20 % 1000), // milliseconds
-                        0, // microseconds
-                        b1[s1 + 3]); // timezone
+                long chrononTime1 = getLong(b1, s1);
+                long chrononTime2 = getLong(b2, s2);
 
-                year = (short) (((b2[s2] & 0xff) << 8) | b2[s2 + 1] & 0xff);
-                time = ((b2[s2 + 4] & 0xff) << 24) | ((b2[s2 + 5] & 0xff) << 16) | ((b2[s2 + 6] & 0xff) << 8)
-                        | (b2[s2 + 7] & 0xff);
+                if (chrononTime1 > chrononTime2) {
+                    return 1;
+                } else if (chrononTime1 < chrononTime2) {
+                    return -1;
+                } else {
+                    return 0;
+                }
+            }
 
-                dt2.setValue(year >> 1, // year
-                        (year & 0x0001) * 8 + ((b2[s2 + 2] >>> 5) & 0x07), // month
-                        b2[s2 + 2] & 0x1f, // day
-                        (short) ((time) * 20 % 216000000 / 3600000), // hour
-                        (short) ((time) * 20 % 3600000 / 60000), // minutes
-                        (short) ((time) * 20 % 60000 / 1000), // seconds
-                        (short) ((time) * 20 % 1000), // milliseconds
-                        0, // microseconds
-                        b2[s2 + 3]); // timezone
-
-                return dt1.compare(dt2);
+            private long getLong(byte[] bytes, int start) {
+                return (((long) (bytes[start] & 0xff)) << 56) + (((long) (bytes[start + 1] & 0xff)) << 48)
+                        + (((long) (bytes[start + 2] & 0xff)) << 40) + (((long) (bytes[start + 3] & 0xff)) << 32)
+                        + (((long) (bytes[start + 4] & 0xff)) << 24) + (((long) (bytes[start + 5] & 0xff)) << 16)
+                        + (((long) (bytes[start + 6] & 0xff)) << 8) + (((long) (bytes[start + 7] & 0xff)) << 0);
             }
 
         };
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADatePrinter.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADatePrinter.java
index e9f887e..24aa144 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADatePrinter.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADatePrinter.java
@@ -2,15 +2,18 @@
 
 import java.io.PrintStream;
 
-import edu.uci.ics.asterix.dataflow.data.nontagged.serde.AInt16SerializerDeserializer;
+import edu.uci.ics.asterix.dataflow.data.nontagged.serde.AInt32SerializerDeserializer;
+import edu.uci.ics.asterix.om.base.temporal.GregorianCalendarSystem;
 import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
 import edu.uci.ics.hyracks.algebricks.data.IPrinter;
 
 public class ADatePrinter implements IPrinter {
 
     private static final long serialVersionUID = 1L;
+    private static long CHRONON_OF_DAY = 24 * 60 * 60 * 1000;
     public static final ADatePrinter INSTANCE = new ADatePrinter();
-
+    private static final GregorianCalendarSystem gCalInstance = GregorianCalendarSystem.getInstance();
+    
     @Override
     public void init() {
 
@@ -18,11 +21,14 @@
 
     @Override
     public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
-        int year = AInt16SerializerDeserializer.getShort(b, s + 1) >> 1;
-        int month = (AInt16SerializerDeserializer.getShort(b, s + 1) & 0x0001) * 8 + ((b[s + 3] >> 5) & 0x07);
-        int day = b[s + 3] & 0x1f;
-        byte timezone = b[s + 4];
-        ps.format("date(\"" + (year < 0 ? "%+05d" : "%04d") + "-%02d-%02d%+03d:%02d\")", year, month, day,
-                timezone / 4, timezone % 4 * ((timezone >= 0) ? 15 : -15));
+        long chrononTime = AInt32SerializerDeserializer.getInt(b, s + 1) * CHRONON_OF_DAY;
+
+        int year = gCalInstance.getYear(chrononTime);
+        int month = gCalInstance.getMonthOfYear(chrononTime, year);
+
+        ps.print("date(\"");
+        ps.append(String.format(year < 0 ? "%05d" : "%04d", year)).append("-").append(String.format("%02d", month))
+                .append("-").append(String.format("%02d", gCalInstance.getDayOfMonthYear(chrononTime, year, month)));
+        ps.print("\")");
     }
 }
\ No newline at end of file
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADateTimePrinter.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADateTimePrinter.java
index e3999f1..d856a20 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADateTimePrinter.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADateTimePrinter.java
@@ -1,18 +1,17 @@
 package edu.uci.ics.asterix.dataflow.data.nontagged.printers;
 
-import java.io.IOException;
 import java.io.PrintStream;
 
-import edu.uci.ics.asterix.dataflow.data.nontagged.serde.AInt16SerializerDeserializer;
-import edu.uci.ics.asterix.dataflow.data.nontagged.serde.AInt32SerializerDeserializer;
+import edu.uci.ics.asterix.dataflow.data.nontagged.serde.AInt64SerializerDeserializer;
+import edu.uci.ics.asterix.om.base.temporal.GregorianCalendarSystem;
 import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
 import edu.uci.ics.hyracks.algebricks.data.IPrinter;
-import edu.uci.ics.hyracks.algebricks.data.utils.WriteValueTools;
 
 public class ADateTimePrinter implements IPrinter {
 
     private static final long serialVersionUID = 1L;
     public static final ADateTimePrinter INSTANCE = new ADateTimePrinter();
+    private static final GregorianCalendarSystem gCalInstance = GregorianCalendarSystem.getInstance();
 
     @Override
     public void init() {
@@ -21,49 +20,18 @@
 
     @Override
     public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
-        int year = AInt16SerializerDeserializer.getShort(b, s + 1) >> 1;
-        int month = (AInt16SerializerDeserializer.getShort(b, s + 1) & 0x0001) * 8 + ((b[s + 3] >> 5) & 0x07);
+        long chrononTime = AInt64SerializerDeserializer.getLong(b, s + 1);
 
-        int day = b[s + 3] & 0x1f;
-        byte timezone = b[s + 4];
-
-        int time = AInt32SerializerDeserializer.getInt(b, s + 5);
-        // int msec = (time) * 20 % 1000;
-        // int sec = (time) * 20 % 60000 / 1000;
-        // int min = (time) * 20 % 3600000 / 60000;
-        // int hour = (time) * 20 % 216000000 / 3600000;
+        int year = gCalInstance.getYear(chrononTime);
+        int month = gCalInstance.getMonthOfYear(chrononTime, year);
 
         ps.print("datetime(\"");
-        if (year < 0) {
-            ps.print("-");
-        }
-        int y = Math.abs(year);
-        if (y < 1000) {
-            ps.print("0");
-        }
-        if (y < 100) {
-            ps.print("0");
-        }
-        if (y < 10) {
-            ps.print("0");
-        }
-        try {
-            WriteValueTools.writeInt(y, ps);
-            ps.print("-");
-            if (month < 10) {
-                ps.print("0");
-            }
-            WriteValueTools.writeInt(month, ps);
-            ps.print("-");
-            if (day < 10) {
-                ps.print("0");
-            }
-            WriteValueTools.writeInt(day, ps);
-            ps.print("T");
-        } catch (IOException e) {
-            throw new AlgebricksException(e);
-        }
-        ATimePrinter.printTime(time, timezone, ps);
+        ps.append(String.format(year < 0 ? "%05d" : "%04d", year)).append("-").append(String.format("%02d", month))
+                .append("-").append(String.format("%02d", gCalInstance.getDayOfMonthYear(chrononTime, year, month)))
+                .append("T").append(String.format("%02d", gCalInstance.getHourOfDay(chrononTime))).append(":")
+                .append(String.format("%02d", gCalInstance.getMinOfHour(chrononTime))).append(":")
+                .append(String.format("%02d", gCalInstance.getSecOfMin(chrononTime))).append(".")
+                .append(String.format("%03d", gCalInstance.getMillisOfSec(chrononTime))).append("Z");
         ps.print("\")");
     }
 }
\ No newline at end of file
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADurationPrinter.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADurationPrinter.java
index 1c4e302..a59b9ac 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADurationPrinter.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ADurationPrinter.java
@@ -4,6 +4,8 @@
 import java.io.PrintStream;
 
 import edu.uci.ics.asterix.dataflow.data.nontagged.serde.AInt32SerializerDeserializer;
+import edu.uci.ics.asterix.dataflow.data.nontagged.serde.AInt64SerializerDeserializer;
+import edu.uci.ics.asterix.om.base.temporal.GregorianCalendarSystem;
 import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
 import edu.uci.ics.hyracks.algebricks.data.IPrinter;
 import edu.uci.ics.hyracks.algebricks.data.utils.WriteValueTools;
@@ -12,6 +14,7 @@
 
     private static final long serialVersionUID = 1L;
     public static final ADurationPrinter INSTANCE = new ADurationPrinter();
+    private static final GregorianCalendarSystem gCalInstance = GregorianCalendarSystem.getInstance();
 
     @Override
     public void init() {
@@ -22,39 +25,63 @@
     public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
         boolean positive = true;
         int months = AInt32SerializerDeserializer.getInt(b, s + 1);
-        int seconds = AInt32SerializerDeserializer.getInt(b, s + 5);
+        long milliseconds = AInt64SerializerDeserializer.getLong(b, s + 5);
 
-        if (months < 0 || seconds < 0) {
+        // set the negative flag. "||" is necessary in case that months field is not there (so it is 0)
+        if (months < 0 || milliseconds < 0) {
             months *= -1;
-            seconds *= -1;
+            milliseconds *= -1;
             positive = false;
         }
 
-        int month = (int) (months % 12);
-        int year = (int) (months / 12);
-        int second = (int) (seconds % 60);
-        int minute = (int) (seconds % 3600 / 60);
-        int hour = (int) (seconds % (86400) / 3600);
-        int day = (int) (seconds / (86400));
+        int month = gCalInstance.getDurationMonth(months);
+        int year = gCalInstance.getDurationYear(months);
+        int millisecond = gCalInstance.getDurationMillisecond(milliseconds);
+        int second = gCalInstance.getDurationSecond(milliseconds);
+        int minute = gCalInstance.getDurationMinute(milliseconds);
+        int hour = gCalInstance.getDurationHour(milliseconds);
+        int day = gCalInstance.getDurationDay(milliseconds);
 
         ps.print("duration(\"");
         if (!positive) {
             ps.print("-");
         }
         try {
-            ps.print("D");
-            WriteValueTools.writeInt(year, ps);
-            ps.print("Y");
-            WriteValueTools.writeInt(month, ps);
-            ps.print("M");
-            WriteValueTools.writeInt(day, ps);
-            ps.print("DT");
-            WriteValueTools.writeInt(hour, ps);
-            ps.print("H");
-            WriteValueTools.writeInt(minute, ps);
-            ps.print("M");
-            WriteValueTools.writeInt(second, ps);
-            ps.print("S\")");
+            ps.print("P");
+            if (year != 0) {
+                WriteValueTools.writeInt(year, ps);
+                ps.print("Y");
+            }
+            if (month != 0) {
+                WriteValueTools.writeInt(month, ps);
+                ps.print("M");
+            }
+            if (day != 0) {
+                WriteValueTools.writeInt(day, ps);
+                ps.print("D");
+            }
+            if (hour != 0 || minute != 0 || second != 0 || millisecond != 0) {
+                ps.print("T");
+            }
+            if (hour != 0) {
+                WriteValueTools.writeInt(hour, ps);
+                ps.print("H");
+            }
+            if (minute != 0) {
+                WriteValueTools.writeInt(minute, ps);
+                ps.print("M");
+            }
+            if (second != 0 || millisecond != 0) {
+                WriteValueTools.writeInt(second, ps);
+            }
+            if (millisecond > 0) {
+                ps.print(".");
+                WriteValueTools.writeInt(millisecond, ps);
+            }
+            if (second != 0 || millisecond != 0) {
+                ps.print("S");
+            }
+            ps.print("\")");
         } catch (IOException e) {
             throw new AlgebricksException(e);
         }
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ATimePrinter.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ATimePrinter.java
index 7f687ea..72a6e37 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ATimePrinter.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ATimePrinter.java
@@ -1,18 +1,18 @@
 package edu.uci.ics.asterix.dataflow.data.nontagged.printers;
 
-import java.io.IOException;
 import java.io.PrintStream;
 
 import edu.uci.ics.asterix.dataflow.data.nontagged.serde.AInt32SerializerDeserializer;
+import edu.uci.ics.asterix.om.base.temporal.GregorianCalendarSystem;
 import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
 import edu.uci.ics.hyracks.algebricks.data.IPrinter;
-import edu.uci.ics.hyracks.algebricks.data.utils.WriteValueTools;
 
 public class ATimePrinter implements IPrinter {
 
     private static final long serialVersionUID = 1L;
     public static final ATimePrinter INSTANCE = new ATimePrinter();
-
+    private static final GregorianCalendarSystem gCalInstance = GregorianCalendarSystem.getInstance();
+    
     @Override
     public void init() {
 
@@ -21,55 +21,14 @@
     @Override
     public void print(byte[] b, int s, int l, PrintStream ps) throws AlgebricksException {
         int time = AInt32SerializerDeserializer.getInt(b, s + 1);
+        
         ps.print("time(\"");
-        int timezone = time >> 24;
-        time -= (timezone << 24);
-        printTime(time, timezone, ps);
+        ps.append(String.format("%02d", gCalInstance.getHourOfDay(time))).append(":")
+                .append(String.format("%02d", gCalInstance.getMinOfHour(time))).append(":")
+                .append(String.format("%02d", gCalInstance.getSecOfMin(time))).append(".")
+                .append(String.format("%03d", gCalInstance.getMillisOfSec(time))).append("Z");
+
         ps.print("\")");
     }
 
-    final static void printTime(int time, int timezone, PrintStream ps) throws AlgebricksException {
-        int msec = time * 20 % 1000;
-        int sec = time * 20 % 60000 / 1000;
-        int min = time * 20 % 3600000 / 60000;
-        int hour = time * 20 % 216000000 / 3600000;
-        try {
-            if (hour < 10) {
-                ps.print("0");
-            }
-            WriteValueTools.writeInt(hour, ps);
-            ps.print(":");
-            if (min < 10) {
-                ps.print("0");
-            }
-            WriteValueTools.writeInt(min, ps);
-            ps.print(":");
-            if (sec < 10) {
-                ps.print("0");
-            }
-            WriteValueTools.writeInt(sec, ps);
-            ps.print(":");
-            if (msec < 100) {
-                ps.print("0");
-            }
-            if (msec < 10) {
-                ps.print("0");
-            }
-            WriteValueTools.writeInt(msec, ps);
-            ps.print(timezone >= 0 ? "+" : "-");
-            int t1 = Math.abs(timezone / 4);
-            if (t1 < 10) {
-                ps.print("0");
-            }
-            WriteValueTools.writeInt(t1, ps);
-            ps.print(":");
-            int t2 = timezone % 4 * ((timezone >= 0) ? 15 : -15);
-            if (t2 < 10) {
-                ps.print("0");
-            }
-            WriteValueTools.writeInt(t2, ps);
-        } catch (IOException e) {
-            throw new AlgebricksException(e);
-        }
-    }
 }
\ No newline at end of file
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ATimePrinterFactory.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ATimePrinterFactory.java
index 2603067..afafb89 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ATimePrinterFactory.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/printers/ATimePrinterFactory.java
@@ -3,8 +3,6 @@
 import edu.uci.ics.hyracks.algebricks.data.IPrinter;
 import edu.uci.ics.hyracks.algebricks.data.IPrinterFactory;
 
-
-
 public class ATimePrinterFactory implements IPrinterFactory {
 
     private static final long serialVersionUID = 1L;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ABooleanSerializerDeserializer.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ABooleanSerializerDeserializer.java
index 474ed85..de95bba 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ABooleanSerializerDeserializer.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ABooleanSerializerDeserializer.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.dataflow.data.nontagged.serde;
 
 import java.io.DataInput;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ACircleSerializerDeserializer.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ACircleSerializerDeserializer.java
index bbf9fbb..02bb281 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ACircleSerializerDeserializer.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ACircleSerializerDeserializer.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.dataflow.data.nontagged.serde;
 
 import java.io.DataInput;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADateSerializerDeserializer.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADateSerializerDeserializer.java
index 6a0e8cd..9bd25f4 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADateSerializerDeserializer.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADateSerializerDeserializer.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.dataflow.data.nontagged.serde;
 
 import java.io.DataInput;
@@ -7,6 +21,9 @@
 import edu.uci.ics.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import edu.uci.ics.asterix.om.base.ADate;
 import edu.uci.ics.asterix.om.base.AMutableDate;
+import edu.uci.ics.asterix.om.base.temporal.ADateAndTimeParser;
+import edu.uci.ics.asterix.om.base.temporal.GregorianCalendarSystem;
+import edu.uci.ics.asterix.om.base.temporal.StringCharSequenceAccessor;
 import edu.uci.ics.asterix.om.types.BuiltinType;
 import edu.uci.ics.hyracks.api.dataflow.value.ISerializerDeserializer;
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
@@ -14,15 +31,11 @@
 public class ADateSerializerDeserializer implements ISerializerDeserializer<ADate> {
 
     private static final long serialVersionUID = 1L;
-    private short year;
-    private byte monthAndDay;
 
     public static final ADateSerializerDeserializer INSTANCE = new ADateSerializerDeserializer();
     @SuppressWarnings("unchecked")
-    private static ISerializerDeserializer<ADate> dateSerde = AqlSerializerDeserializerProvider.INSTANCE
+    private static final ISerializerDeserializer<ADate> dateSerde = AqlSerializerDeserializerProvider.INSTANCE
             .getSerializerDeserializer(BuiltinType.ADATE);
-    private static AMutableDate aDate = new AMutableDate(0, 0, 0, 0);
-    private static String errorMessage = " can not be an instance of date";
 
     private ADateSerializerDeserializer() {
     }
@@ -30,10 +43,7 @@
     @Override
     public ADate deserialize(DataInput in) throws HyracksDataException {
         try {
-            year = in.readShort();
-            monthAndDay = in.readByte();
-            return new ADate(year >> 1, (year & 0x0001) * 8 + ((monthAndDay >> 5) & 0x07), monthAndDay & 0x1f,
-                    in.readByte());
+            return new ADate(in.readInt());
         } catch (IOException e) {
             throw new HyracksDataException(e);
         }
@@ -42,60 +52,30 @@
     @Override
     public void serialize(ADate instance, DataOutput out) throws HyracksDataException {
         try {
-            out.writeByte((byte) ((instance.getYear() << 1) >> 8));
-            out.writeByte((byte) ((byte) ((instance.getYear() << 1) & 0x00ff) + (byte) (instance.getMonth() >> 3)));
-            out.writeByte((byte) (((byte) (instance.getMonth() << 5)) | ((byte) instance.getDay())));
-            out.writeByte((byte) instance.getTimeZone());
+            out.writeInt(instance.getChrononTimeInDays());
         } catch (IOException e) {
             throw new HyracksDataException(e);
         }
     }
 
     public static void parse(String date, DataOutput out) throws HyracksDataException {
-        int offset = 0;
-        boolean positive = true;
-        byte timezonePart = 0;
-        if (date.charAt(0) == '-') {
-            positive = false;
-            offset++;
+        AMutableDate aDate = new AMutableDate(0);
+
+        long chrononTimeInMs = 0;
+        try {
+            StringCharSequenceAccessor charAccessor = new StringCharSequenceAccessor();
+            charAccessor.reset(date, 0);
+            chrononTimeInMs = ADateAndTimeParser.parseDatePart(charAccessor, true);
+        } catch (Exception e) {
+            throw new HyracksDataException(e);
         }
 
-        if (date.charAt(offset + 4) != '-' || date.charAt(offset + 7) != '-')
-            throw new HyracksDataException(date + errorMessage);
-        short year = Short.parseShort(date.substring(offset, offset + 4));
-        short month = Short.parseShort(date.substring(offset + 5, offset + 7));
-        short day = Short.parseShort(date.substring(offset + 8, offset + 10));
-        short hour, minute;
-        if (year < 0 || year > 9999 || month < 0 || month > 12 || day < 0 || day > 31)
-            throw new HyracksDataException(date + errorMessage);
-
-        offset += 10;
-
-        if (date.length() > offset) {
-            if (date.charAt(offset) == 'Z')
-                timezonePart = 0;
-            else {
-                if ((date.charAt(offset) != '+' && date.charAt(offset) != '-') || (date.charAt(offset + 3) != ':'))
-                    throw new HyracksDataException(date + errorMessage);
-
-                hour = Short.parseShort(date.substring(offset + 1, offset + 3));
-                minute = Short.parseShort(date.substring(offset + 4, offset + 6));
-
-                if (hour < 0 || hour > 24 || (hour == 24 && minute != 0)
-                        || (minute != 0 && minute != 15 && minute != 30 && minute != 45))
-                    throw new HyracksDataException(date + errorMessage);
-
-                if (date.charAt(offset) == '-')
-                    timezonePart = (byte) -((hour * 4) + minute / 15);
-                else
-                    timezonePart = (byte) ((hour * 4) + minute / 15);
-            }
-
+        short temp = 0;
+        if (chrononTimeInMs < 0 && chrononTimeInMs % GregorianCalendarSystem.CHRONON_OF_DAY != 0) {
+            temp = 1;
         }
-        if (!positive)
-            year *= -1;
-        aDate.setValue(year, month, day, timezonePart);
+        aDate.setValue((int) (chrononTimeInMs / GregorianCalendarSystem.CHRONON_OF_DAY) - temp);
+
         dateSerde.serialize(aDate, out);
     }
-
 }
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADateTimeSerializerDeserializer.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADateTimeSerializerDeserializer.java
index c22da77..cb9e8e0 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADateTimeSerializerDeserializer.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADateTimeSerializerDeserializer.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.dataflow.data.nontagged.serde;
 
 import java.io.DataInput;
@@ -7,7 +21,10 @@
 import edu.uci.ics.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import edu.uci.ics.asterix.om.base.ADateTime;
 import edu.uci.ics.asterix.om.base.AMutableDateTime;
+import edu.uci.ics.asterix.om.base.temporal.ADateAndTimeParser;
+import edu.uci.ics.asterix.om.base.temporal.StringCharSequenceAccessor;
 import edu.uci.ics.asterix.om.types.BuiltinType;
+import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
 import edu.uci.ics.hyracks.api.dataflow.value.ISerializerDeserializer;
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
 
@@ -17,15 +34,10 @@
 
     public static final ADateTimeSerializerDeserializer INSTANCE = new ADateTimeSerializerDeserializer();
     @SuppressWarnings("unchecked")
-    private static ISerializerDeserializer<ADateTime> datetimeSerde = AqlSerializerDeserializerProvider.INSTANCE
+    private static final ISerializerDeserializer<ADateTime> datetimeSerde = AqlSerializerDeserializerProvider.INSTANCE
             .getSerializerDeserializer(BuiltinType.ADATETIME);
-    private static AMutableDateTime aDateTime = new AMutableDateTime(0, 0, 0, 0, 0, 0, 0, 0, 0);
-    private static String errorMessage = " can not be an instance of datetime";
 
-    private int time;
-    private byte timezone;
-    private short year;
-    private byte monthAndDay;
+    private static final String errorMessage = "This can not be an instance of datetime";
 
     private ADateTimeSerializerDeserializer() {
     }
@@ -33,14 +45,7 @@
     @Override
     public ADateTime deserialize(DataInput in) throws HyracksDataException {
         try {
-            year = in.readShort();
-            monthAndDay = in.readByte();
-            timezone = in.readByte();
-            time = in.readInt();
-
-            return new ADateTime(year >> 1, (year & 0x0001) * 8 + ((monthAndDay >> 5) & 0x07), monthAndDay & 0x1f,
-                    (short) ((time) * 20 % 216000000 / 3600000), (short) ((time) * 20 % 3600000 / 60000),
-                    (short) ((time) * 20 % 60000 / 1000), (short) ((time) * 20 % 1000), (short) 0, timezone);
+            return new ADateTime(in.readLong());
         } catch (IOException e) {
             throw new HyracksDataException(e);
         }
@@ -49,92 +54,40 @@
     @Override
     public void serialize(ADateTime instance, DataOutput out) throws HyracksDataException {
         try {
-            out.writeByte((byte) ((instance.getYear() << 1) >> 8));
-            out.writeByte((byte) ((byte) ((instance.getYear() << 1) & 0x00ff) + (byte) (instance.getMonth() >> 3)));
-            out.writeByte((byte) ((instance.getMonth() << 5) | (instance.getDay())));
-            out.writeByte((byte) instance.getTimeZone());
-            out.writeInt((((((instance.getHours() * 60) + instance.getMinutes()) * 60) + instance.getSeconds()) * 1000 + instance
-                    .getMilliseconds()) / 20);
+            out.writeLong(instance.getChrononTime());
         } catch (IOException e) {
             throw new HyracksDataException(e);
         }
     }
 
     public static void parse(String datetime, DataOutput out) throws HyracksDataException {
-        boolean positive = true;
-        int offset = 0;
-        byte timezonePart = 0;
+        AMutableDateTime aDateTime = new AMutableDateTime(0L);
 
-        if (datetime.charAt(offset) == '-') {
-            offset++;
-            positive = false;
-        }
+        long chrononTimeInMs = 0;
+        try {
+            StringCharSequenceAccessor charAccessor = new StringCharSequenceAccessor();
+            charAccessor.reset(datetime, 0);
 
-        if (datetime.charAt(offset + 4) != '-' || datetime.charAt(offset + 7) != '-')
-            throw new HyracksDataException(datetime + errorMessage);
+            // +1 if it is negative (-)
+            short timeOffset = (short) ((charAccessor.getCharAt(0) == '-') ? 1 : 0);
 
-        short year = Short.parseShort(datetime.substring(offset, offset + 4));
-        short month = Short.parseShort(datetime.substring(offset + 5, offset + 7));
-        short day = Short.parseShort(datetime.substring(offset + 8, offset + 10));
-
-        if (year < 0 || year > 9999 || month < 0 || month > 12 || day < 0 || day > 31)
-            throw new HyracksDataException(datetime + errorMessage);
-
-        if (!positive)
-            year *= -1;
-
-        if (datetime.charAt(offset + 10) != 'T')
-            throw new HyracksDataException(datetime + errorMessage);
-
-        offset += 11;
-
-        if (datetime.charAt(offset + 2) != ':' || datetime.charAt(offset + 5) != ':')
-            throw new HyracksDataException(datetime + errorMessage);
-
-        short hour = Short.parseShort(datetime.substring(offset, offset + 2));
-        short minute = Short.parseShort(datetime.substring(offset + 3, offset + 5));
-        short second = Short.parseShort(datetime.substring(offset + 6, offset + 8));
-        short msecond = 0;
-
-        if (datetime.length() > offset + 8 && datetime.charAt(offset + 8) == ':') {
-            msecond = Short.parseShort(datetime.substring(offset + 9, offset + 12));
-            if (hour < 0 || hour > 24 || minute < 0 || minute > 59 || second < 0 || second > 59 || msecond < 0
-                    || msecond > 999 || (hour == 24 && (minute != 0 || second != 0 || msecond != 0)))
-                throw new HyracksDataException(datetime + errorMessage);
-            offset += 12;
-        } else {
-            if (hour < 0 || hour > 24 || minute < 0 || minute > 59 || second < 0 || second > 59
-                    || (hour == 24 && (minute != 0 || second != 0)))
-                throw new HyracksDataException(datetime + errorMessage);
-            offset += 8;
-        }
-
-        short timezoneHour = 0, timezoneMinute = 0;
-        if (datetime.length() > offset) {
-            if (datetime.charAt(offset) == 'Z')
-                timezonePart = 0;
-            else {
-                if ((datetime.charAt(offset) != '+' && datetime.charAt(offset) != '-')
-                        || (datetime.charAt(offset + 3) != ':'))
-                    throw new HyracksDataException(datetime + errorMessage);
-
-                timezoneHour = Short.parseShort(datetime.substring(offset + 1, offset + 3));
-                timezoneMinute = Short.parseShort(datetime.substring(offset + 4, offset + 6));
-
-                if (timezoneHour < 0
-                        || timezoneHour > 24
-                        || (timezoneHour == 24 && timezoneMinute != 0)
-                        || (timezoneMinute != 0 && timezoneMinute != 15 && timezoneMinute != 30 && timezoneMinute != 45))
-                    throw new HyracksDataException(datetime + errorMessage);
-
-                if (datetime.charAt(offset) == '-')
-                    timezonePart = (byte) -((timezoneHour * 4) + timezoneMinute / 15);
-                else
-                    timezonePart = (byte) ((timezoneHour * 4) + timezoneMinute / 15);
+            if (charAccessor.getCharAt(timeOffset + 10) != 'T' && charAccessor.getCharAt(timeOffset + 8) != 'T') {
+                throw new AlgebricksException(errorMessage + ": missing T");
             }
 
+            // if extended form 11, else 9
+            timeOffset += (charAccessor.getCharAt(timeOffset + 13) == ':') ? (short) (11) : (short) (9);
+
+            chrononTimeInMs = ADateAndTimeParser.parseDatePart(charAccessor, false);
+
+            charAccessor.reset(datetime, timeOffset);
+
+            chrononTimeInMs += ADateAndTimeParser.parseTimePart(charAccessor);
+        } catch (Exception e) {
+            throw new HyracksDataException(e);
         }
-        aDateTime.setValue(year, month, day, hour, minute, second, msecond, 0, timezonePart);
+        aDateTime.setValue(chrononTimeInMs);
+
         datetimeSerde.serialize(aDateTime, out);
     }
 }
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADoubleSerializerDeserializer.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADoubleSerializerDeserializer.java
index 0fdd657..115b2ec 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADoubleSerializerDeserializer.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADoubleSerializerDeserializer.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.dataflow.data.nontagged.serde;
 
 import java.io.DataInput;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADurationSerializerDeserializer.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADurationSerializerDeserializer.java
index 134eed6..c3333f0 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADurationSerializerDeserializer.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ADurationSerializerDeserializer.java
@@ -7,6 +7,8 @@
 import edu.uci.ics.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import edu.uci.ics.asterix.om.base.ADuration;
 import edu.uci.ics.asterix.om.base.AMutableDuration;
+import edu.uci.ics.asterix.om.base.temporal.ADurationParser;
+import edu.uci.ics.asterix.om.base.temporal.StringCharSequenceAccessor;
 import edu.uci.ics.asterix.om.types.BuiltinType;
 import edu.uci.ics.hyracks.api.dataflow.value.ISerializerDeserializer;
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
@@ -16,12 +18,9 @@
     private static final long serialVersionUID = 1L;
 
     public static final ADurationSerializerDeserializer INSTANCE = new ADurationSerializerDeserializer();
-
-    private static AMutableDuration aDuration = new AMutableDuration(0, 0);
     @SuppressWarnings("unchecked")
-    private static ISerializerDeserializer<ADuration> durationSerde = AqlSerializerDeserializerProvider.INSTANCE
+    private static final ISerializerDeserializer<ADuration> durationSerde = AqlSerializerDeserializerProvider.INSTANCE
             .getSerializerDeserializer(BuiltinType.ADURATION);
-    private static String errorMessage = " can not be an instance of duration";
 
     private ADurationSerializerDeserializer() {
     }
@@ -29,7 +28,7 @@
     @Override
     public ADuration deserialize(DataInput in) throws HyracksDataException {
         try {
-            return new ADuration(in.readInt(), in.readInt());
+            return new ADuration(in.readInt(), in.readLong());
         } catch (IOException e) {
             throw new HyracksDataException(e);
         }
@@ -39,7 +38,7 @@
     public void serialize(ADuration instance, DataOutput out) throws HyracksDataException {
         try {
             out.writeInt(instance.getMonths());
-            out.writeInt(instance.getSeconds());
+            out.writeLong(instance.getMilliseconds());
         } catch (IOException e) {
             throw new HyracksDataException(e);
         }
@@ -47,119 +46,14 @@
 
     public static void parse(String duration, DataOutput out) throws HyracksDataException {
         try {
-            boolean positive = true;
-            int offset = 0;
-            int value = 0, hour = 0, minute = 0, second = 0, year = 0, month = 0, day = 0;
-            boolean isYear = true, isMonth = true, isDay = true, isHour = true, isMinute = true, isSecond = true;
-            boolean isTime = false;
-            boolean timeItem = true;
-            if (duration.charAt(offset) == '-') {
-                offset++;
-                positive = false;
-            }
+            AMutableDuration aDuration = new AMutableDuration(0, 0);
+            StringCharSequenceAccessor charAccessor = new StringCharSequenceAccessor();
+            charAccessor.reset(duration, 0);
+            ADurationParser.parse(charAccessor, aDuration);
 
-            if (duration.charAt(offset++) != 'D')
-                throw new HyracksDataException(duration + errorMessage);
-
-            for (; offset < duration.length(); offset++) {
-                if (duration.charAt(offset) >= '0' && duration.charAt(offset) <= '9')
-                    value = value * 10 + duration.charAt(offset) - '0';
-                else {
-                    switch (duration.charAt(offset)) {
-                        case 'Y':
-                            if (isYear) {
-                                year = value;
-                                isYear = false;
-                            } else
-                                throw new HyracksDataException(duration + errorMessage);
-                            break;
-                        case 'M':
-                            if (!isTime) {
-                                if (isMonth) {
-                                    if (value < 0 || value > 11)
-                                        throw new HyracksDataException(duration + errorMessage);
-                                    else {
-                                        month = value;
-                                        isMonth = false;
-                                    }
-                                } else
-                                    throw new HyracksDataException(duration + errorMessage);
-                            } else if (isMinute) {
-                                if (value < 0 || value > 59)
-                                    throw new HyracksDataException(duration + errorMessage);
-                                else {
-                                    minute = value;
-                                    isMinute = false;
-                                    timeItem = false;
-                                }
-                            } else
-                                throw new HyracksDataException(duration + errorMessage);
-                            break;
-                        case 'D':
-                            if (isDay) {
-                                if (value < 0 || value > 30)
-                                    throw new HyracksDataException(duration + errorMessage);
-                                else {
-                                    day = value;
-                                    isDay = false;
-                                }
-                            } else
-                                throw new HyracksDataException(duration + errorMessage);
-                            break;
-                        case 'T':
-                            if (!isTime) {
-                                isTime = true;
-                                timeItem = true;
-                            } else
-                                throw new HyracksDataException(duration + errorMessage);
-                            break;
-
-                        case 'H':
-                            if (isHour) {
-                                if (value < 0 || value > 23)
-                                    throw new HyracksDataException(duration + errorMessage);
-                                else {
-                                    hour = value;
-                                    isHour = false;
-                                    timeItem = false;
-                                }
-                            } else
-                                throw new HyracksDataException(duration + errorMessage);
-                            break;
-                        case 'S':
-                            if (isSecond) {
-                                if (value < 0 || value > 59)
-                                    throw new HyracksDataException(duration + errorMessage);
-                                else {
-                                    second = value;
-                                    isSecond = false;
-                                    timeItem = false;
-                                }
-                            } else
-                                throw new HyracksDataException(duration + errorMessage);
-                            break;
-                        default:
-                            throw new HyracksDataException(duration + errorMessage);
-
-                    }
-                    value = 0;
-                }
-            }
-
-            if (isTime && timeItem)
-                throw new HyracksDataException(duration + errorMessage);
-
-            if (isYear && isMonth && isDay && !isTime)
-                throw new HyracksDataException(duration + errorMessage);
-
-            if (positive)
-                aDuration.setValue(year * 12 + month, day * 24 * 3600 + 3600 * hour + 60 * minute + second);
-            else
-                aDuration.setValue(-1 * (year * 12 + month), -1
-                        * (day * 24 * 3600 + 3600 * hour + 60 * minute + second));
             durationSerde.serialize(aDuration, out);
-        } catch (HyracksDataException e) {
-            throw new HyracksDataException(duration + errorMessage);
+        } catch (Exception e) {
+            throw new HyracksDataException(e);
         }
     }
 }
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ATimeSerializerDeserializer.java b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ATimeSerializerDeserializer.java
index 1d4fe07..8860f2a 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ATimeSerializerDeserializer.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/dataflow/data/nontagged/serde/ATimeSerializerDeserializer.java
@@ -7,6 +7,8 @@
 import edu.uci.ics.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import edu.uci.ics.asterix.om.base.AMutableTime;
 import edu.uci.ics.asterix.om.base.ATime;
+import edu.uci.ics.asterix.om.base.temporal.ADateAndTimeParser;
+import edu.uci.ics.asterix.om.base.temporal.StringCharSequenceAccessor;
 import edu.uci.ics.asterix.om.types.BuiltinType;
 import edu.uci.ics.hyracks.api.dataflow.value.ISerializerDeserializer;
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
@@ -18,12 +20,8 @@
     public static final ATimeSerializerDeserializer INSTANCE = new ATimeSerializerDeserializer();
 
     @SuppressWarnings("unchecked")
-    private static ISerializerDeserializer<ATime> timeSerde = AqlSerializerDeserializerProvider.INSTANCE
+    private static final ISerializerDeserializer<ATime> timeSerde = AqlSerializerDeserializerProvider.INSTANCE
             .getSerializerDeserializer(BuiltinType.ATIME);
-    private static AMutableTime aTime = new AMutableTime(0, 0, 0, 0, 0, 0);
-    private static String errorMessage = " can not be an instance of time";
-
-    private int time, timezone;
 
     private ATimeSerializerDeserializer() {
     }
@@ -31,12 +29,8 @@
     @Override
     public ATime deserialize(DataInput in) throws HyracksDataException {
         try {
-            time = in.readInt();
-            timezone = time >> 24;
-            time -= (timezone << 24);
-            return new ATime((short) ((time << 8 >> 8) * 20 % 216000000 / 3600000),
-                    (short) ((time << 8 >> 8) * 20 % 3600000 / 60000), (short) ((time << 8 >> 8) * 20 % 60000 / 1000),
-                    (short) ((time << 8 >> 8) * 20 % 1000), (short) 0, timezone);
+            return new ATime(in.readInt());
+
         } catch (IOException e) {
             throw new HyracksDataException(e);
         }
@@ -45,84 +39,28 @@
     @Override
     public void serialize(ATime instance, DataOutput out) throws HyracksDataException {
         try {
-            time = instance.getTimeZone();
-            time = time << 24;
-            time = time
-                    + ((((((instance.getHours() * 60) + instance.getMinutes()) * 60) + instance.getSeconds()) * 1000 + instance
-                            .getMilliseconds()) / 20);
-            out.writeInt(time);
+            out.writeInt(instance.getChrononTime());
 
         } catch (IOException e) {
             throw new HyracksDataException(e);
         }
     }
 
-    public static final void serialize(short hour, short minute, short second, short msecond, byte timeZone,
-            DataOutput out) throws HyracksDataException {
-        try {
-            int time = timeZone;
-            time = time << 24;
-            time = time + ((((((hour * 60) + minute) * 60) + second) * 1000 + msecond) / 20);
-            out.writeInt(time);
-        } catch (IOException e) {
-            throw new HyracksDataException(e);
-        }
-    }
-
     public static void parse(String time, DataOutput out) throws HyracksDataException {
+        AMutableTime aTime = new AMutableTime(0);
+        int chrononTimeInMs;
+
         try {
-            byte timezonePart = 0;
-            int offset = 0;
-            if (time.charAt(offset + 2) != ':' || time.charAt(offset + 5) != ':')
-                throw new HyracksDataException(time + errorMessage);
-
-            short hour = Short.parseShort(time.substring(offset, offset + 2));
-            short minute = Short.parseShort(time.substring(offset + 3, offset + 5));
-            short second = Short.parseShort(time.substring(offset + 6, offset + 8));
-            short msecond = 0;
-            if (time.length() > offset + 8 && time.charAt(offset + 8) == ':') {
-                msecond = Short.parseShort(time.substring(offset + 9, offset + 12));
-                if (hour < 0 || hour > 24 || minute < 0 || minute > 59 || second < 0 || second > 59 || msecond < 0
-                        || msecond > 999 || (hour == 24 && (minute != 0 || second != 0 || msecond != 0)))
-                    throw new HyracksDataException(time + errorMessage);
-                offset += 12;
-            } else {
-                if (hour < 0 || hour > 24 || minute < 0 || minute > 59 || second < 0 || second > 59
-                        || (hour == 24 && (minute != 0 || second != 0)))
-                    throw new HyracksDataException(time + errorMessage);
-                offset += 8;
-            }
-
-            short timezoneHour = 0, timezoneMinute = 0;
-            if (time.length() > offset) {
-                if (time.charAt(offset) == 'Z')
-                    timezonePart = 0;
-                else {
-                    if ((time.charAt(offset) != '+' && time.charAt(offset) != '-') || (time.charAt(offset + 3) != ':'))
-                        throw new HyracksDataException(time + errorMessage);
-
-                    timezoneHour = Short.parseShort(time.substring(offset + 1, offset + 3));
-                    timezoneMinute = Short.parseShort(time.substring(offset + 4, offset + 6));
-
-                    if (timezoneHour < 0
-                            || timezoneHour > 24
-                            || (timezoneHour == 24 && timezoneMinute != 0)
-                            || (timezoneMinute != 0 && timezoneMinute != 15 && timezoneMinute != 30 && timezoneMinute != 45))
-                        throw new HyracksDataException(time + errorMessage);
-
-                    if (time.charAt(offset) == '-')
-                        timezonePart = (byte) -((timezoneHour * 4) + timezoneMinute / 15);
-                    else
-                        timezonePart = (byte) ((timezoneHour * 4) + timezoneMinute / 15);
-                }
-
-            }
-
-            aTime.setValue(hour, minute, second, msecond, 0, timezonePart);
-
-            timeSerde.serialize(aTime, out);
-        } catch (HyracksDataException e) {
-            throw new HyracksDataException(time + errorMessage);
+            StringCharSequenceAccessor charAccessor = new StringCharSequenceAccessor();
+            charAccessor.reset(time, 0);
+            chrononTimeInMs = ADateAndTimeParser.parseTimePart(charAccessor);
+        } catch (Exception e) {
+            throw new HyracksDataException(e);
         }
+
+        aTime.setValue(chrononTimeInMs);
+
+        timeSerde.serialize(aTime, out);
     }
+
 }
\ No newline at end of file
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ABinary.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ABinary.java
index d155f6d..db9ac03 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ABinary.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ABinary.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.common.exceptions.AsterixException;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ABitArray.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ABitArray.java
index 28f139a..4178b5a 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ABitArray.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ABitArray.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.common.exceptions.AsterixException;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ABoolean.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ABoolean.java
index 2627ff6..11b223a 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ABoolean.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ABoolean.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.common.exceptions.AsterixException;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ACircle.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ACircle.java
index 5d0977c..767f172 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ACircle.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ACircle.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.common.exceptions.AsterixException;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ACollectionCursor.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ACollectionCursor.java
index 20afc2e..23c0552 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ACollectionCursor.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ACollectionCursor.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import java.util.ArrayList;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ADate.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ADate.java
index f60c908..ea4c33b 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ADate.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ADate.java
@@ -1,38 +1,39 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.common.exceptions.AsterixException;
+import edu.uci.ics.asterix.om.base.temporal.GregorianCalendarSystem;
 import edu.uci.ics.asterix.om.types.BuiltinType;
 import edu.uci.ics.asterix.om.types.IAType;
 import edu.uci.ics.asterix.om.visitors.IOMVisitor;
 
+/**
+ * ADate type represents dates in a gregorian calendar system.
+ */
 public class ADate implements IAObject {
 
-    protected int day;
-    protected int month;
-    protected int year;
-    protected int timezone;
+    /**
+     * the number of full calendar days since the 1970-01-01 represented by the date value.
+     */
+    protected int chrononTimeInDay;
 
-    public ADate(int year, int month, int day, int timezone) {
-        this.day = day;
-        this.month = month;
-        this.year = year;
-        this.timezone = timezone;
-    }
+    private static long CHRONON_OF_DAY = 24 * 60 * 60 * 1000;
 
-    public int getDay() {
-        return day;
-    }
-
-    public int getMonth() {
-        return month;
-    }
-
-    public int getTimeZone() {
-        return timezone;
-    }
-
-    public int getYear() {
-        return year;
+    public ADate(int chrononTimeInDay) {
+        this.chrononTimeInDay = chrononTimeInDay;
     }
 
     public IAType getType() {
@@ -43,14 +44,13 @@
         if (!(o instanceof ADate)) {
             return false;
         } else {
-            ADate d = (ADate) o;
-            return d.getDay() == day && d.getMonth() == month && d.getYear() == year && d.getTimeZone() == timezone;
+            return ((ADate) o).chrononTimeInDay == this.chrononTimeInDay;
         }
     }
 
     @Override
     public int hashCode() {
-        return ((year * 31 + month) * 31 + day) * 31 + timezone;
+        return chrononTimeInDay;
     }
 
     @Override
@@ -70,6 +70,16 @@
 
     @Override
     public String toString() {
-        return "ADate: { " + year + "-" + month + "-" + day + ":" + timezone + " }";
+        StringBuilder sbder = new StringBuilder();
+        sbder.append("ADate: { ");
+        GregorianCalendarSystem.getInstance().getExtendStringRepWithTimezoneUntilField(
+                chrononTimeInDay * CHRONON_OF_DAY, 0, sbder, GregorianCalendarSystem.Fields.YEAR,
+                GregorianCalendarSystem.Fields.DAY);
+        sbder.append(" }");
+        return sbder.toString();
+    }
+
+    public int getChrononTimeInDays() {
+        return chrononTimeInDay;
     }
 }
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ADateTime.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ADateTime.java
index e300d78..e72fd8f 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ADateTime.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ADateTime.java
@@ -1,73 +1,53 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.common.exceptions.AsterixException;
+import edu.uci.ics.asterix.om.base.temporal.GregorianCalendarSystem;
 import edu.uci.ics.asterix.om.types.BuiltinType;
 import edu.uci.ics.asterix.om.types.IAType;
 import edu.uci.ics.asterix.om.visitors.IOMVisitor;
 
+/**
+ * ADateTime type represents the timestamp values.
+ * <p/>
+ * An ADateTime value contains the following time fields:<br/>
+ * - year;<br/>
+ * - month;<br/>
+ * - day;<br/>
+ * - hour; <br/>
+ * - minute; <br/>
+ * - second; <br/>
+ * - millisecond. <br/>
+ * By default, an ADateTime value is a UTC time value, i.e., there is no timezone information maintained. However user can use the timezone based AQL function to convert a UTC time to a timezone-embedded time.
+ * <p/>
+ * And the string representation of an ADateTime value follows the ISO8601 standard, in the following format:<br/>
+ * [+|-]YYYY-MM-DDThh:mm:ss.xxxZ
+ * <p/>
+ * Internally, an ADateTime value is stored as the number of milliseconds elapsed since 1970-01-01T00:00:00.000Z (also called chronon time). Functions to convert between a string representation of an ADateTime and its chronon time are implemented in {@link GregorianCalendarSystem}.
+ * <p/>
+ */
 public class ADateTime implements IAObject {
 
-    private static final int[] NUM_DAYS_IN_MONTH = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
+    /**
+     * Represent the time interval as milliseconds since 1970-01-01T00:00:00.000Z.
+     */
+    protected long chrononTime;
 
-    protected int day;
-    protected int hour;
-    protected int minutes;
-    protected int month;
-    protected int seconds;
-    protected int timezone;
-    protected int year;
-    protected int milliseconds;
-    protected int microseconds;
-
-    public ADateTime(int year, int month, int day, int hour, int minutes, int seconds, int timezone) {
-        this.year = year;
-        this.month = month;
-        this.day = day;
-        this.hour = hour;
-        this.minutes = minutes;
-        this.seconds = seconds;
-        this.timezone = timezone;
-    }
-
-    public ADateTime(int year, int month, int day, int hour, int minutes, int seconds, int milliseconds,
-            int microseconds, int timezone) {
-        this.year = year;
-        this.month = month;
-        this.day = day;
-        this.hour = hour;
-        this.minutes = minutes;
-        this.seconds = seconds;
-        this.milliseconds = milliseconds;
-        this.microseconds = microseconds;
-        this.timezone = timezone;
-    }
-
-    public int getDay() {
-        return day;
-    }
-
-    public int getHours() {
-        return hour;
-    }
-
-    public int getMinutes() {
-        return minutes;
-    }
-
-    public int getMonth() {
-        return month;
-    }
-
-    public int getSeconds() {
-        return seconds;
-    }
-
-    public int getTimeZone() {
-        return timezone;
-    }
-
-    public int getYear() {
-        return year;
+    public ADateTime(long chrononTime) {
+        this.chrononTime = chrononTime;
     }
 
     @Override
@@ -75,125 +55,33 @@
         return BuiltinType.ADATETIME;
     }
 
-    public int getMicroseconds() {
-        return microseconds;
-    }
-
-    public int getMilliseconds() {
-        return milliseconds;
-    }
-
     public int compare(Object o) {
         if (!(o instanceof ADateTime)) {
             return -1;
         }
 
         ADateTime d = (ADateTime) o;
-        if (timezone != d.getTimeZone()) {
-            AMutableDateTime dt1 = new AMutableDateTime(year, month, day, hour, minutes, seconds, milliseconds,
-                    microseconds, timezone);
-            AMutableDateTime dt2 = new AMutableDateTime(d.getYear(), d.getMonth(), d.getDay(), d.getHours(),
-                    d.getMinutes(), d.getSeconds(), d.getMilliseconds(), d.getMicroseconds(), d.getTimeZone());
-            dt1.convertToUTC();
-            dt2.convertToUTC();
-
-            return dt1.tzEqualCompare(dt2);
-
-        }
-
-        return tzEqualCompare(d);
-    }
-
-    protected void convertToUTC() {
-        short tzMin = (short) ((timezone % 4) * 15);
-        short tzHr = (short) (timezone / 4);
-        minutes -= tzMin;
-        if (minutes >= 60) {
-            minutes %= 60;
-            hour += 1;
-        }
-        hour -= tzHr;
-        if (hour >= 24) {
-            hour %= 24;
-            day += 1;
-        }
-        if (isLeapYear(year) && month == 2) {
-            if (day >= 29) {
-                day %= 29;
-                month += 1;
-            }
+        if (this.chrononTime > d.chrononTime) {
+            return 1;
+        } else if (this.chrononTime < d.chrononTime) {
+            return -1;
         } else {
-            if (day >= NUM_DAYS_IN_MONTH[month - 1]) {
-                day %= NUM_DAYS_IN_MONTH[month - 1];
-                month += 1;
-            }
+            return 0;
         }
-
-        if (month >= 12) {
-            month %= 12;
-            year += 1;
-        }
-        timezone = 0;
-
-    }
-
-    protected static boolean isLeapYear(int year) {
-        if (year % 400 == 0) {
-            return true;
-        } else if (year % 100 == 0) {
-            return false;
-        } else if (year % 4 == 0) {
-            return true;
-        } else {
-            return false;
-        }
-    }
-
-    // comparison that assumes the timezones are the same!
-    protected int tzEqualCompare(ADateTime d) {
-        if (year != d.getYear()) {
-            return year - d.getYear();
-        }
-        if (month != d.getMonth()) {
-            return month - d.getMonth();
-        }
-        if (day != d.getDay()) {
-            return day - d.getDay();
-        }
-        if (hour != d.getHours()) {
-            return hour - d.getHours();
-        }
-        if (minutes != d.getMinutes()) {
-            return minutes - d.getMinutes();
-        }
-        if (seconds != d.getSeconds()) {
-            return seconds - d.getSeconds();
-        }
-        if (milliseconds != d.getMilliseconds()) {
-            return milliseconds - d.getMilliseconds();
-        }
-        if (microseconds != d.getMicroseconds()) {
-            return microseconds - d.getMicroseconds();
-        }
-
-        return 0;
     }
 
     public boolean equals(Object o) {
         if (!(o instanceof ADateTime)) {
             return false;
         } else {
-            ADateTime d = (ADateTime) o;
-            return d.getMicroseconds() == microseconds && d.getMilliseconds() == milliseconds
-                    && d.getSeconds() == seconds && d.getMinutes() == minutes && d.getHours() == hour
-                    && d.getDay() == day && d.getMonth() == month && d.getYear() == year && d.getTimeZone() == timezone;
+            ADateTime t = (ADateTime) o;
+            return t.chrononTime == this.chrononTime;
         }
     }
 
     @Override
     public int hashCode() {
-        return (((((((year * 31 + month) * 31 + day) * 31 + timezone) * 31 + hour) * 31 + minutes) * 31 + seconds) * 31 + milliseconds)
-                * 31 + microseconds;
+        return (int) (chrononTime ^ (chrononTime >>> 32));
     }
 
     @Override
@@ -213,8 +101,16 @@
 
     @Override
     public String toString() {
-        return "ADateTime: { " + year + "-" + month + "-" + day + ":" + hour + ":" + minutes + ":" + seconds + ":"
-                + milliseconds + ":" + microseconds + ":" + timezone + " }";
+        StringBuilder sbder = new StringBuilder();
+        sbder.append("ADateTime: { ");
+        GregorianCalendarSystem.getInstance().getExtendStringRepWithTimezoneUntilField(chrononTime, 0, sbder,
+                GregorianCalendarSystem.Fields.YEAR, GregorianCalendarSystem.Fields.MILLISECOND);
+        sbder.append(" }");
+        return sbder.toString();
+    }
+
+    public long getChrononTime() {
+        return chrononTime;
     }
 
 }
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ADouble.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ADouble.java
index e8dd845..816b8be 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ADouble.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ADouble.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.common.exceptions.AsterixException;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ADuration.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ADuration.java
index 6f8064e..13f4a05 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ADuration.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ADuration.java
@@ -1,26 +1,67 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.common.exceptions.AsterixException;
+import edu.uci.ics.asterix.om.base.temporal.GregorianCalendarSystem;
 import edu.uci.ics.asterix.om.types.BuiltinType;
 import edu.uci.ics.asterix.om.types.IAType;
 import edu.uci.ics.asterix.om.visitors.IOMVisitor;
 
+/**
+ * ADuration type represents time duration (unanchored time length) values.
+ * <p/>
+ * An ADuration value may contain the same fields as the {@link ADateTime}: <br/>
+ * - year;<br/>
+ * - month;<br/>
+ * - day;<br/>
+ * - hour; <br/>
+ * - minute; <br/>
+ * - second; <br/>
+ * - millisecond. <br/>
+ * Compared with {@link ADateTime}, a field in a duration value does not have the limited domain requirement. A duration field is valid as far as the value of the field is an integer.
+ * </p>
+ * We also support negative durations, which is not specified by ISO 8601, but has been
+ * supported by XML spec to enable the arithmetic operations between time instances.
+ * <p/>
+ * Internally, an ADuration value is stored as two fields: an integer field as the number of months for the YEAR and MONTH fields, and a long integer field as the number of milliseconds for the other fields.
+ * <p/>
+ */
 public class ADuration implements IAObject {
 
-    protected int months;
-    protected int seconds;
+    /**
+     * number of full months represented by the year-month part
+     */
+    protected int chrononInMonth;
 
-    public ADuration(int months, int seconds) {
-        this.months = months;
-        this.seconds = seconds;
+    /**
+     * number of milliseconds represented by the part other than the year and month
+     */
+    protected long chrononInMillisecond;
+
+    public ADuration(int months, long seconds) {
+        this.chrononInMonth = months;
+        this.chrononInMillisecond = seconds;
     }
 
     public int getMonths() {
-        return months;
+        return chrononInMonth;
     }
 
-    public int getSeconds() {
-        return seconds;
+    public long getMilliseconds() {
+        return chrononInMillisecond;
     }
 
     @Override
@@ -34,13 +75,13 @@
             return false;
         } else {
             ADuration d = (ADuration) o;
-            return d.getMonths() == months && d.getSeconds() == seconds;
+            return d.getMonths() == chrononInMonth && d.getMilliseconds() == chrononInMillisecond;
         }
     }
 
     @Override
     public int hashCode() {
-        return months * 31 + seconds;
+        return (int) (chrononInMonth ^ (chrononInMillisecond) ^ (chrononInMillisecond >>> 32));
     }
 
     @Override
@@ -58,4 +99,14 @@
         return hashCode();
     }
 
+    @Override
+    public String toString() {
+        StringBuilder sbder = new StringBuilder();
+        sbder.append("ADuration: {");
+        GregorianCalendarSystem.getInstance().getDurationExtendStringRepWithTimezoneUntilField(chrononInMillisecond,
+                chrononInMonth, sbder);
+        sbder.append(" }");
+        return sbder.toString();
+    }
+
 }
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AFloat.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AFloat.java
index 8404b5e..a66e198 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AFloat.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AFloat.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.common.exceptions.AsterixException;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AInt16.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AInt16.java
index 75fe896..bd27f20 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AInt16.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AInt16.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.common.exceptions.AsterixException;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AInt32.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AInt32.java
index 86c071b..b656a57 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AInt32.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AInt32.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.common.exceptions.AsterixException;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AInt64.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AInt64.java
index 36d482a..193a4af 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AInt64.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AInt64.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.common.exceptions.AsterixException;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AInt8.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AInt8.java
index 5dabba5..87e5472 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AInt8.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AInt8.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.common.exceptions.AsterixException;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ALine.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ALine.java
index d96830a..0285825 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ALine.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ALine.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.common.exceptions.AsterixException;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableCircle.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableCircle.java
index f85470e..84b35fb 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableCircle.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableCircle.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 public class AMutableCircle extends ACircle {
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableDate.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableDate.java
index 78a87b8..7a5fa02 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableDate.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableDate.java
@@ -1,16 +1,27 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 public class AMutableDate extends ADate {
 
-    public AMutableDate(int year, int month, int day, int timezone) {
-        super(year, month, day, timezone);
+    public AMutableDate(int chrononTimeInDays) {
+        super(chrononTimeInDays);
     }
 
-    public void setValue(int year, int month, int day, int timezone) {
-        this.year = year;
-        this.month = month;
-        this.day = day;
-        this.timezone = timezone;
+    public void setValue(int chrononTimeInDays) {
+        this.chrononTimeInDay = chrononTimeInDays;
     }
 
 }
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableDateTime.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableDateTime.java
index 01e30a2..576c8e3 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableDateTime.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableDateTime.java
@@ -1,23 +1,27 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 public class AMutableDateTime extends ADateTime {
 
-    public AMutableDateTime(int year, int month, int day, int hour, int minutes, int seconds, int milliseconds,
-            int microseconds, int timezone) {
-        super(year, month, day, hour, minutes, seconds, milliseconds, microseconds, timezone);
+    public AMutableDateTime(long chrononTime) {
+        super(chrononTime);
     }
 
-    public void setValue(int year, int month, int day, int hour, int minutes, int seconds, int milliseconds,
-            int microseconds, int timezone) {
-        this.year = year;
-        this.month = month;
-        this.day = day;
-        this.hour = hour;
-        this.minutes = minutes;
-        this.seconds = seconds;
-        this.milliseconds = milliseconds;
-        this.microseconds = microseconds;
-        this.timezone = timezone;
+    public void setValue(long chrononTime) {
+        this.chrononTime = chrononTime;
     }
 
 }
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableDouble.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableDouble.java
index 849879e..e7fa620 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableDouble.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableDouble.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 public class AMutableDouble extends ADouble {
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableDuration.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableDuration.java
index f776817..ecea300 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableDuration.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableDuration.java
@@ -1,14 +1,28 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 public class AMutableDuration extends ADuration {
 
-    public AMutableDuration(int months, int seconds) {
-        super(months, seconds);
+    public AMutableDuration(int months, long milliseconds) {
+        super(months, milliseconds);
     }
 
-    public void setValue(int months, int seconds) {
-        this.months = months;
-        this.seconds = seconds;
+    public void setValue(int months, long milliseconds) {
+        this.chrononInMonth = months;
+        this.chrononInMillisecond = milliseconds;
     }
 
 }
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableFloat.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableFloat.java
index 4752631..fbc3de2 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableFloat.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableFloat.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 public class AMutableFloat extends AFloat {
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableInt16.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableInt16.java
index 3fdd468..3c242bd 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableInt16.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableInt16.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 public class AMutableInt16 extends AInt16 {
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableInt32.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableInt32.java
index 94a97a8..dd15e62 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableInt32.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableInt32.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 public class AMutableInt32 extends AInt32 {
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableInt64.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableInt64.java
index 41188ac..5c6a90c 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableInt64.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableInt64.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 public class AMutableInt64 extends AInt64 {
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableInt8.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableInt8.java
index f33a251..f8a3de9 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableInt8.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableInt8.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 public class AMutableInt8 extends AInt8 {
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableLine.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableLine.java
index 4204e7a..0786d51 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableLine.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableLine.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 public class AMutableLine extends ALine {
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableOrderedList.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableOrderedList.java
index aa581ea..619ebaa 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableOrderedList.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableOrderedList.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import java.util.ArrayList;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutablePoint.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutablePoint.java
index 520ae7a..b33f961 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutablePoint.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutablePoint.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 public class AMutablePoint extends APoint {
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutablePoint3D.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutablePoint3D.java
index 80687b1..3fa3b26 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutablePoint3D.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutablePoint3D.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 public class AMutablePoint3D extends APoint3D {
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutablePolygon.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutablePolygon.java
index f78ab17..2f592ff 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutablePolygon.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutablePolygon.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 public class AMutablePolygon extends APolygon {
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableRecord.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableRecord.java
index 19ccd2a..08b45a0 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableRecord.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableRecord.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.om.types.ARecordType;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableRectangle.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableRectangle.java
index e156264..c05376c 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableRectangle.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableRectangle.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 public class AMutableRectangle extends ARectangle {
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableString.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableString.java
index 8f778b3..4a3beec 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableString.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableString.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 public class AMutableString extends AString {
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableTime.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableTime.java
index a23b8e3..10a7249 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableTime.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableTime.java
@@ -1,17 +1,27 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 public class AMutableTime extends ATime {
 
-    public AMutableTime(int hour, int minutes, int seconds, int milliseconds, int microseconds, int timezone) {
-        super(hour, minutes, seconds, milliseconds, microseconds, timezone);
+    public AMutableTime(int timeInMillisec) {
+        super(timeInMillisec);
     }
 
-    public void setValue(int hour, int minutes, int seconds, int milliseconds, int microseconds, int timezone) {
-        this.hour = hour;
-        this.minutes = minutes;
-        this.seconds = seconds;
-        this.milliseconds = milliseconds;
-        this.timezone = timezone;
+    public void setValue(int timeInMillisec) {
+        this.chrononTime = timeInMillisec;
     }
 
 }
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableUnorderedList.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableUnorderedList.java
index ece4026..71c3986 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableUnorderedList.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AMutableUnorderedList.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import java.util.ArrayList;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ANull.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ANull.java
index a5f5a3c..be47b41 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ANull.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ANull.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.common.exceptions.AsterixException;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AOrderedList.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AOrderedList.java
index 9c21986..4f5effd 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AOrderedList.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AOrderedList.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import java.util.ArrayList;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/APoint.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/APoint.java
index 1e80a8c..8e261a2 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/APoint.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/APoint.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.common.exceptions.AsterixException;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/APoint3D.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/APoint3D.java
index e937b68..29ef6cd 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/APoint3D.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/APoint3D.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.common.exceptions.AsterixException;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/APolygon.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/APolygon.java
index cdeacac..29e3727 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/APolygon.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/APolygon.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.common.exceptions.AsterixException;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ARecord.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ARecord.java
index f1f1255..0d1f578 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ARecord.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ARecord.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.common.exceptions.AsterixException;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ARectangle.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ARectangle.java
index bcf9e8e..51f06bf 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ARectangle.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ARectangle.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.common.exceptions.AsterixException;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AString.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AString.java
index ce78dcb..0f7c9c2 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AString.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AString.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.common.exceptions.AsterixException;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ATime.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ATime.java
index f948ffc..7b66cf9 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ATime.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/ATime.java
@@ -1,49 +1,34 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.common.exceptions.AsterixException;
+import edu.uci.ics.asterix.om.base.temporal.GregorianCalendarSystem;
 import edu.uci.ics.asterix.om.types.BuiltinType;
 import edu.uci.ics.asterix.om.types.IAType;
 import edu.uci.ics.asterix.om.visitors.IOMVisitor;
 
 public class ATime implements IAObject {
 
-    protected int hour;
-    protected int minutes;
-    protected int seconds;
-    protected int timezone;
-    protected int milliseconds;
-    protected int microseconds;
+    /**
+     * number of milliseconds since the beginning of a day represented by this time value
+     */
+    protected int chrononTime;
 
-    public ATime(int hour, int minutes, int seconds, int timezone) {
-        this.hour = hour;
-        this.minutes = minutes;
-        this.seconds = seconds;
-        this.timezone = timezone;
-    }
-
-    public ATime(int hour, int minutes, int seconds, int milliseconds, int microseconds, int timezone) {
-        this.hour = hour;
-        this.minutes = minutes;
-        this.seconds = seconds;
-        this.milliseconds = milliseconds;
-        this.microseconds = microseconds;
-        this.timezone = timezone;
-    }
-
-    public int getHours() {
-        return hour;
-    }
-
-    public int getMinutes() {
-        return minutes;
-    }
-
-    public int getSeconds() {
-        return seconds;
-    }
-
-    public int getTimeZone() {
-        return timezone;
+    public ATime(int chrononTime) {
+        this.chrononTime = chrononTime;
     }
 
     @Override
@@ -51,29 +36,36 @@
         return BuiltinType.ATIME;
     }
 
-    public int getMicroseconds() {
-        return microseconds;
-    }
+    public int compare(Object o) {
+        if (!(o instanceof ATime)) {
+            return -1;
+        }
 
-    public int getMilliseconds() {
-        return milliseconds;
+        ATime d = (ATime) o;
+        if (this.chrononTime > d.chrononTime) {
+            return 1;
+        } else if (this.chrononTime < d.chrononTime) {
+            return -1;
+        } else {
+            return 0;
+        }
     }
 
     @Override
     public boolean equals(Object o) {
+
         if (!(o instanceof ATime)) {
             return false;
         } else {
             ATime t = (ATime) o;
-            return t.getMicroseconds() == microseconds && t.getMilliseconds() == milliseconds
-                    && t.getSeconds() == seconds && t.getMinutes() == minutes && t.getHours() == hour
-                    && t.getTimeZone() == timezone;
+            return t.chrononTime == this.chrononTime;
+
         }
     }
 
     @Override
     public int hashCode() {
-        return ((((timezone * 31 + hour) * 31 + minutes) * 31 + seconds) * 31 + milliseconds) * 31 + microseconds;
+        return chrononTime;
     }
 
     @Override
@@ -93,7 +85,17 @@
 
     @Override
     public String toString() {
-        return "ATime: { " + hour + ":" + minutes + ":" + seconds + ":" + milliseconds + ":" + microseconds + ":"
-                + timezone + " }";
+        StringBuilder sbder = new StringBuilder();
+        sbder.append("ATime: { ");
+        GregorianCalendarSystem.getInstance().getExtendStringRepWithTimezoneUntilField(chrononTime, 0, sbder,
+                GregorianCalendarSystem.Fields.HOUR, GregorianCalendarSystem.Fields.MILLISECOND);
+        sbder.append(" }");
+        return sbder.toString();
+
     }
+
+    public int getChrononTime() {
+        return chrononTime;
+    }
+
 }
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AUnorderedList.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AUnorderedList.java
index 2ce8363..764d05b 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AUnorderedList.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/AUnorderedList.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import java.util.ArrayList;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/IACollection.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/IACollection.java
index 03b7cad..db7134a 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/IACollection.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/IACollection.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 public interface IACollection extends IAObject {
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/IACursor.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/IACursor.java
index ecbbde3..2da505c 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/IACursor.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/IACursor.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 /**
  * 
  */
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/IAObject.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/IAObject.java
index d98d181..463154b 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/IAObject.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/IAObject.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 import edu.uci.ics.asterix.common.exceptions.AsterixException;
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/InMemUtils.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/InMemUtils.java
index 905ca5f..4d4e2b1 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/InMemUtils.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/InMemUtils.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.base;
 
 public class InMemUtils {
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/ADateAndTimeParser.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/ADateAndTimeParser.java
new file mode 100644
index 0000000..30ee525
--- /dev/null
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/ADateAndTimeParser.java
@@ -0,0 +1,264 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package edu.uci.ics.asterix.om.base.temporal;
+
+public class ADateAndTimeParser {
+
+    private static final GregorianCalendarSystem gCalInstance = GregorianCalendarSystem.getInstance();
+
+    private static final String dateErrorMessage = "Wrong date format!";
+    private static final String timeErrorMessage = "Wrong time format!";
+
+    /**
+     * Parse the given char sequence as a date string, and return the milliseconds represented by the date.
+     * 
+     * @param charAccessor
+     *            accessor for the char sequence
+     * @param isDateOnly
+     *            indicating whether it is a single date string, or it is the date part of a datetime string
+     * @param errorMessage
+     * @return
+     * @throws Exception
+     */
+    public static <T> long parseDatePart(ICharSequenceAccessor<T> charAccessor, boolean isDateOnly) throws Exception {
+
+        int length = charAccessor.getLength();
+        int offset = 0;
+
+        int year = 0, month = 0, day = 0;
+        boolean positive = true;
+
+        boolean isExtendedForm = false;
+
+        if (charAccessor.getCharAt(offset) == '-') {
+            offset++;
+            positive = false;
+        }
+
+        if ((isDateOnly) && charAccessor.getCharAt(offset + 4) == '-' || (!isDateOnly)
+                && charAccessor.getCharAt(offset + 13) == ':') {
+            isExtendedForm = true;
+        }
+
+        if (isExtendedForm) {
+            if (charAccessor.getCharAt(offset + 4) != '-' || charAccessor.getCharAt(offset + 7) != '-') {
+                throw new Exception(dateErrorMessage);
+            }
+        }
+
+        // year
+        for (int i = 0; i < 4; i++) {
+            if (charAccessor.getCharAt(offset + i) >= '0' && charAccessor.getCharAt(offset + i) <= '9') {
+                year = year * 10 + charAccessor.getCharAt(offset + i) - '0';
+            } else {
+                throw new Exception(dateErrorMessage);
+            }
+        }
+
+        if (year < GregorianCalendarSystem.FIELD_MINS[GregorianCalendarSystem.Fields.YEAR.ordinal()]
+                || year > GregorianCalendarSystem.FIELD_MAXS[GregorianCalendarSystem.Fields.YEAR.ordinal()]) {
+            throw new Exception(dateErrorMessage + ": year " + year);
+        }
+
+        offset += (isExtendedForm) ? 5 : 4;
+
+        // month
+        for (int i = 0; i < 2; i++) {
+            if ((charAccessor.getCharAt(offset + i) >= '0' && charAccessor.getCharAt(offset + i) <= '9')) {
+                month = month * 10 + charAccessor.getCharAt(offset + i) - '0';
+            } else {
+                throw new Exception(dateErrorMessage);
+            }
+        }
+
+        if (month < GregorianCalendarSystem.FIELD_MINS[GregorianCalendarSystem.Fields.MONTH.ordinal()]
+                || month > GregorianCalendarSystem.FIELD_MAXS[GregorianCalendarSystem.Fields.MONTH.ordinal()]) {
+            throw new Exception(dateErrorMessage + ": month " + month);
+        }
+        offset += (isExtendedForm) ? 3 : 2;
+
+        // day
+        for (int i = 0; i < 2; i++) {
+            if ((charAccessor.getCharAt(offset + i) >= '0' && charAccessor.getCharAt(offset + i) <= '9')) {
+                day = day * 10 + charAccessor.getCharAt(offset + i) - '0';
+            } else {
+                throw new Exception(dateErrorMessage);
+            }
+        }
+
+        if (day < GregorianCalendarSystem.FIELD_MINS[GregorianCalendarSystem.Fields.DAY.ordinal()]
+                || day > GregorianCalendarSystem.FIELD_MAXS[GregorianCalendarSystem.Fields.DAY.ordinal()]) {
+            throw new Exception(dateErrorMessage + ": day " + day);
+        }
+
+        offset += 2;
+
+        if (!positive) {
+            year *= -1;
+        }
+
+        if (isDateOnly && length > offset) {
+            throw new Exception(dateErrorMessage);
+        }
+        return gCalInstance.getChronon(year, month, day, 0, 0, 0, 0, 0);
+    }
+
+    /**
+     * Parse the given char sequence as a time string, and return the milliseconds represented by the time.
+     * 
+     * @param charAccessor
+     * @return
+     * @throws Exception
+     */
+    public static <T> int parseTimePart(ICharSequenceAccessor<T> charAccessor) throws Exception {
+
+        int length = charAccessor.getLength();
+        int offset = 0;
+
+        int hour = 0, min = 0, sec = 0, millis = 0;
+        int timezone = 0;
+
+        boolean isExtendedForm = false;
+        if (charAccessor.getCharAt(offset + 2) == ':') {
+            isExtendedForm = true;
+        }
+
+        if (isExtendedForm && (charAccessor.getCharAt(offset + 2) != ':' || charAccessor.getCharAt(offset + 5) != ':')) {
+            throw new Exception(timeErrorMessage);
+        }
+        // hour
+        for (int i = 0; i < 2; i++) {
+            if ((charAccessor.getCharAt(offset + i) >= '0' && charAccessor.getCharAt(offset + i) <= '9')) {
+                hour = hour * 10 + charAccessor.getCharAt(offset + i) - '0';
+            } else {
+                throw new Exception(timeErrorMessage);
+            }
+        }
+
+        if (hour < GregorianCalendarSystem.FIELD_MINS[GregorianCalendarSystem.Fields.HOUR.ordinal()]
+                || hour > GregorianCalendarSystem.FIELD_MAXS[GregorianCalendarSystem.Fields.HOUR.ordinal()]) {
+            throw new Exception(timeErrorMessage + ": hour " + hour);
+        }
+
+        offset += (isExtendedForm) ? 3 : 2;
+
+        // minute
+        for (int i = 0; i < 2; i++) {
+            if ((charAccessor.getCharAt(offset + i) >= '0' && charAccessor.getCharAt(offset + i) <= '9')) {
+                min = min * 10 + charAccessor.getCharAt(offset + i) - '0';
+            } else {
+                throw new Exception(timeErrorMessage);
+            }
+        }
+
+        if (min < GregorianCalendarSystem.FIELD_MINS[GregorianCalendarSystem.Fields.MINUTE.ordinal()]
+                || min > GregorianCalendarSystem.FIELD_MAXS[GregorianCalendarSystem.Fields.MINUTE.ordinal()]) {
+            throw new Exception(timeErrorMessage + ": min " + min);
+        }
+
+        offset += (isExtendedForm) ? 3 : 2;
+
+        // second
+        for (int i = 0; i < 2; i++) {
+            if ((charAccessor.getCharAt(offset + i) >= '0' && charAccessor.getCharAt(offset + i) <= '9')) {
+                sec = sec * 10 + charAccessor.getCharAt(offset + i) - '0';
+            } else {
+                throw new Exception(timeErrorMessage);
+            }
+        }
+
+        if (sec < GregorianCalendarSystem.FIELD_MINS[GregorianCalendarSystem.Fields.SECOND.ordinal()]
+                || sec > GregorianCalendarSystem.FIELD_MAXS[GregorianCalendarSystem.Fields.SECOND.ordinal()]) {
+            throw new Exception(timeErrorMessage + ": sec " + sec);
+        }
+
+        offset += 2;
+
+        if ((isExtendedForm && length > offset && charAccessor.getCharAt(offset) == '.')
+                || (!isExtendedForm && length > offset)) {
+
+            offset += (isExtendedForm) ? 1 : 0;
+            int i = 0;
+            for (; i < 3 && offset + i < length; i++) {
+                if (charAccessor.getCharAt(offset + i) >= '0' && charAccessor.getCharAt(offset + i) <= '9') {
+                    millis = millis * 10 + charAccessor.getCharAt(offset + i) - '0';
+                } else {
+                    break;
+                }
+            }
+
+            offset += i;
+
+            for (; i < 3; i++) {
+                millis = millis * 10;
+            }
+
+            // error is thrown if more than three digits are seen for the millisecond part
+            if (charAccessor.getCharAt(offset) >= '0' && charAccessor.getCharAt(offset) <= '9') {
+                throw new Exception("Wrong format of time instance: too many fields for millisecond.");
+            }
+        }
+
+        if (length > offset) {
+            if (charAccessor.getCharAt(offset) != 'Z') {
+                if ((charAccessor.getCharAt(offset) != '+' && charAccessor.getCharAt(offset) != '-')
+                        || (isExtendedForm && charAccessor.getCharAt(offset + 3) != ':')) {
+                    throw new Exception(timeErrorMessage);
+                }
+
+                short timezoneHour = 0;
+                short timezoneMinute = 0;
+
+                for (int i = 0; i < 2; i++) {
+                    if ((charAccessor.getCharAt(offset + 1 + i) >= '0' && charAccessor.getCharAt(offset + 1 + i) <= '9')) {
+                        timezoneHour = (short) (timezoneHour * 10 + charAccessor.getCharAt(offset + 1 + i) - '0');
+                    } else {
+                        throw new Exception(timeErrorMessage);
+                    }
+                }
+
+                if (timezoneHour < GregorianCalendarSystem.TIMEZONE_HOUR_MIN
+                        || timezoneHour > GregorianCalendarSystem.TIMEZONE_HOUR_MAX) {
+                    throw new Exception(timeErrorMessage + ": time zone hour " + timezoneHour);
+                }
+
+                int temp_offset = (isExtendedForm) ? 1 : 0;
+
+                for (int i = 0; i < 2; i++) {
+                    if ((charAccessor.getCharAt(offset + temp_offset + 3 + i) >= '0' && charAccessor.getCharAt(offset
+                            + temp_offset + 3 + i) <= '9')) {
+                        timezoneMinute = (short) (timezoneMinute * 10
+                                + charAccessor.getCharAt(offset + temp_offset + 3 + i) - '0');
+                    } else {
+                        throw new Exception(timeErrorMessage);
+                    }
+                }
+
+                if (timezoneMinute < GregorianCalendarSystem.TIMEZONE_MIN_MIN
+                        || timezoneMinute > GregorianCalendarSystem.TIMEZONE_MIN_MAX) {
+                    throw new Exception(timeErrorMessage + ": time zone minute " + timezoneMinute);
+                }
+
+                if (charAccessor.getCharAt(offset) == '-') {
+                    timezone = (byte) -((timezoneHour * 4) + timezoneMinute / 15);
+                } else {
+                    timezone = (byte) ((timezoneHour * 4) + timezoneMinute / 15);
+                }
+            }
+        }
+
+        return gCalInstance.getChronon(hour, min, sec, millis, timezone);
+    }
+}
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/ADurationParser.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/ADurationParser.java
new file mode 100644
index 0000000..5d43bba
--- /dev/null
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/ADurationParser.java
@@ -0,0 +1,153 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package edu.uci.ics.asterix.om.base.temporal;
+
+import edu.uci.ics.asterix.om.base.AMutableDuration;
+
+public class ADurationParser {
+
+    private enum State {
+        NOTHING_READ,
+        YEAR,
+        MONTH,
+        DAY,
+        TIME,
+        HOUR,
+        MIN,
+        MILLISEC,
+        SEC;
+    };
+
+    private static final String errorMessage = "This can not be an instance of duration";
+
+    public static <T> void parse(ICharSequenceAccessor<T> charAccessor, AMutableDuration aDuration) throws Exception {
+
+        boolean positive = true;
+        int offset = 0;
+        int value = 0, hour = 0, minute = 0, second = 0, millisecond = 0, year = 0, month = 0, day = 0;
+        State state = State.NOTHING_READ;
+
+        if (charAccessor.getCharAt(offset) == '-') {
+            offset++;
+            positive = false;
+        }
+
+        if (charAccessor.getCharAt(offset++) != 'P') {
+            throw new Exception(errorMessage);
+        }
+
+        for (; offset < charAccessor.getLength(); offset++) {
+            if (charAccessor.getCharAt(offset) >= '0' && charAccessor.getCharAt(offset) <= '9') {
+                // accumulate the digit fields
+                value = value * 10 + charAccessor.getCharAt(offset) - '0';
+            } else {
+                switch (charAccessor.getCharAt(offset)) {
+                    case 'Y':
+                        if (state.compareTo(State.YEAR) < 0) {
+                            year = value;
+                            state = State.YEAR;
+                        } else {
+                            throw new Exception(errorMessage);
+                        }
+                        break;
+                    case 'M':
+                        if (state.compareTo(State.TIME) < 0) {
+                            if (state.compareTo(State.MONTH) < 0) {
+                                month = value;
+                                state = State.MONTH;
+                            } else {
+                                throw new Exception(errorMessage);
+                            }
+                        } else if (state.compareTo(State.MIN) < 0) {
+                            minute = value;
+                            state = State.MIN;
+                        } else {
+                            throw new Exception(errorMessage);
+                        }
+                        break;
+                    case 'D':
+                        if (state.compareTo(State.DAY) < 0) {
+                            day = value;
+                            state = State.DAY;
+                        } else {
+                            throw new Exception(errorMessage);
+                        }
+                        break;
+                    case 'T':
+                        if (state.compareTo(State.TIME) < 0) {
+                            state = State.TIME;
+                        } else {
+                            throw new Exception(errorMessage);
+                        }
+                        break;
+
+                    case 'H':
+                        if (state.compareTo(State.HOUR) < 0) {
+                            hour = value;
+                            state = State.HOUR;
+                        } else {
+                            throw new Exception(errorMessage);
+                        }
+                        break;
+                    case '.':
+                        if (state.compareTo(State.MILLISEC) < 0) {
+                            int i = 1;
+                            for (; offset + i < charAccessor.getLength(); i++) {
+                                if (charAccessor.getCharAt(offset + i) >= '0'
+                                        && charAccessor.getCharAt(offset + i) <= '9') {
+                                    if (i < 4) {
+                                        millisecond = millisecond * 10 + (charAccessor.getCharAt(offset + i) - '0');
+                                    } else {
+                                        throw new Exception(errorMessage);
+                                    }
+                                } else {
+                                    break;
+                                }
+                            }
+                            offset += i;
+                            state = State.MILLISEC;
+                        } else {
+                            throw new Exception(errorMessage);
+                        }
+                    case 'S':
+                        if (state.compareTo(State.SEC) < 0) {
+                            second = value;
+                            state = State.SEC;
+                        } else {
+                            throw new Exception(errorMessage);
+                        }
+                        break;
+                    default:
+                        throw new Exception(errorMessage);
+
+                }
+                value = 0;
+            }
+        }
+
+        if (state.compareTo(State.TIME) == 0) {
+            throw new Exception(errorMessage);
+        }
+
+        short temp = 1;
+        if (!positive) {
+            temp = -1;
+        }
+
+        aDuration.setValue(temp * (year * 12 + month), temp
+                * (day * 24 * 3600 * 1000L + 3600 * 1000L * hour + 60 * minute * 1000L + second * 1000L + millisecond));
+
+    }
+}
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/ByteArrayCharSequenceAccessor.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/ByteArrayCharSequenceAccessor.java
new file mode 100644
index 0000000..e1a2135
--- /dev/null
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/ByteArrayCharSequenceAccessor.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package edu.uci.ics.asterix.om.base.temporal;
+
+public class ByteArrayCharSequenceAccessor implements ICharSequenceAccessor<Byte[]> {
+
+    private byte[] string;
+    private int offset;
+    private int beginOffset;
+
+    @Override
+    public char getCharAt(int index) {
+        return (char) (string[index + offset + beginOffset]);
+    }
+
+    /* The offset is the position of the first letter in the byte array */
+    public void reset(byte[] obj, int beginOffset, int offset) {
+        string = obj;
+        this.offset = offset;
+        this.beginOffset = beginOffset;
+    }
+
+    @Override
+    public int getLength() {
+        return ((string[beginOffset - 2] & 0xff) << 8) + ((string[beginOffset - 1] & 0xff) << 0) - offset;
+    }
+
+}
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/GregorianCalendarSystem.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/GregorianCalendarSystem.java
new file mode 100644
index 0000000..149a1d2
--- /dev/null
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/GregorianCalendarSystem.java
@@ -0,0 +1,688 @@
+/*
+ * Copyright 2009-2012 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Joda API (http://joda-time.sourceforge.net/) is under the protection of:
+ * 
+ * Copyright 2001-2005 Stephen Colebourne
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package edu.uci.ics.asterix.om.base.temporal;
+
+/**
+ * A simple implementation of the Gregorian calendar system.
+ * <p/>
+ */
+public class GregorianCalendarSystem implements ICalendarSystem {
+
+    public enum Fields {
+        YEAR,
+        MONTH,
+        DAY,
+        HOUR,
+        MINUTE,
+        SECOND,
+        MILLISECOND
+    };
+
+    //public static final int YEAR = 0, MONTH = 1, DAY = 2, HOUR = 3, MINUTE = 4, SECOND = 5, MILLISECOND = 6;
+
+    public static final int[] DAYS_OF_MONTH_ORDI = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
+    public static final int[] DAYS_OF_MONTH_LEAP = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
+
+    public static final int[] DAYS_SINCE_MONTH_BEGIN_ORDI = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 };
+
+    public static final int CHRONON_OF_SECOND = 1000;
+    public static final int CHRONON_OF_MINUTE = 60 * CHRONON_OF_SECOND;
+    public static final int CHRONON_OF_HOUR = 60 * CHRONON_OF_MINUTE;
+    public static final long CHRONON_OF_DAY = 24 * CHRONON_OF_HOUR;
+
+    /**
+     * Minimum feasible value of each field
+     */
+    public static final int[] FIELD_MINS = { Integer.MIN_VALUE, // year
+            1, // month
+            1, // day
+            0, // hour
+            0, // minute
+            0, // second
+            0 // millisecond
+    };
+
+    public static final int[] FIELD_MAXS = { Integer.MAX_VALUE, // year
+            12, // month
+            31, // day
+            23, // hour
+            59, // minute
+            59, // second
+            999 // millisecond
+    };
+
+    public static final int TIMEZONE_HOUR_MIN = -12, TIMEZONE_HOUR_MAX = 14, TIMEZONE_MIN_MIN = -60,
+            TIMEZONE_MIN_MAX = 60;
+
+    /**
+     * From Joda API: GregorianChronology.java
+     */
+    private static final long CHRONON_OF_YEAR = (long) (365.2425 * CHRONON_OF_DAY);
+
+    /**
+     * From Joda API: GregorianChronology.java
+     */
+    private static final int DAYS_0000_TO_1970 = 719527;
+
+    private static final GregorianCalendarSystem instance = new GregorianCalendarSystem();
+
+    private GregorianCalendarSystem() {
+    }
+
+    public static GregorianCalendarSystem getInstance() {
+        return instance;
+    }
+
+    /**
+     * Check whether the given date time value is a valid date time following the gregorian calendar system.
+     * 
+     * @param fields
+     * @return
+     */
+    public boolean validate(int year, int month, int day, int hour, int min, int sec, int millis) {
+        // Check whether each field is within the value domain
+        if (year < FIELD_MINS[0] || year > FIELD_MAXS[0]) {
+            return false;
+        }
+        if (month < FIELD_MINS[1] || month > FIELD_MAXS[1]) {
+            return false;
+        }
+        if (day < FIELD_MINS[2] || day > FIELD_MAXS[2]) {
+            return false;
+        }
+        if (hour < FIELD_MINS[3] || hour > FIELD_MAXS[3]) {
+            return false;
+        }
+        if (min < FIELD_MINS[4] || min > FIELD_MAXS[4]) {
+            return false;
+        }
+        if (sec < FIELD_MINS[5] || sec > FIELD_MAXS[5]) {
+            return false;
+        }
+        if (millis < FIELD_MINS[6] || millis > FIELD_MAXS[6]) {
+            return false;
+        }
+
+        // Check whether leap month.
+        if (month == 2) {
+            if (isLeapYear(year)) {
+                if (month > DAYS_OF_MONTH_LEAP[1]) {
+                    return false;
+                }
+            } else {
+                if (month > DAYS_OF_MONTH_ORDI[1]) {
+                    return false;
+                }
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Check whether the given time zone value is a valid time zone following the gregorian calendar system.
+     * <p/>
+     * The valid timezone is within the range of:<br/>
+     * - Hours: UTC -12 (Y, or Yankee Time Zone) to UTC +14 (LINT, or Line Islands Time) <br/>
+     * - Minutes: currently the available minutes include 00, 30 and 45.
+     * <p/>
+     * Reference: http://www.timeanddate.com/library/abbreviations/timezones/
+     * <p/>
+     * 
+     * @param timezone
+     * @return
+     */
+    public boolean validateTimeZone(int timezone) {
+        short tzMin = (short) ((timezone % 4) * 15);
+
+        if (tzMin < -60 || tzMin >= 60) {
+            return false;
+        }
+
+        short tzHr = (short) (timezone / 4);
+
+        if (tzHr < -12 && tzHr > 14) {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Validate the given chronon time and time zone.
+     * 
+     * @param year
+     * @param month
+     * @param day
+     * @param hour
+     * @param min
+     * @param sec
+     * @param millis
+     * @param timezone
+     * @return
+     */
+    public boolean validate(int year, int month, int day, int hour, int min, int sec, int millis, int timezone) {
+        return validate(year, month, day, hour, min, sec, millis) && validateTimeZone(timezone);
+    }
+
+    /**
+     * Get the UTC chronon time of the given date time and time zone.
+     * 
+     * @param year
+     * @param month
+     * @param day
+     * @param hour
+     * @param min
+     * @param sec
+     * @param millis
+     * @param timezone
+     * @return
+     */
+    public long getChronon(int year, int month, int day, int hour, int min, int sec, int millis, int timezone) {
+        // Added milliseconds for all fields but month and day
+        long chrononTime = chrononizeBeginningOfYear(year) + (hour - timezone / 4) * CHRONON_OF_HOUR
+                + (min - (timezone % 4) * 15) * CHRONON_OF_MINUTE + sec * CHRONON_OF_SECOND + millis;
+
+        // Added milliseconds for days of the month. 
+        chrononTime += (day - 1 + DAYS_SINCE_MONTH_BEGIN_ORDI[month - 1]) * CHRONON_OF_DAY;
+
+        // Adjust the leap year
+        if (month > 2 && isLeapYear(year)) {
+            chrononTime += CHRONON_OF_DAY;
+        }
+
+        return chrononTime;
+    }
+
+    /**
+     * Get the chronon time (number of milliseconds) of the given time and time zone.
+     * 
+     * @param hour
+     * @param min
+     * @param sec
+     * @param millis
+     * @param timezone
+     * @return
+     */
+    public int getChronon(int hour, int min, int sec, int millis, int timezone) {
+        // Added milliseconds for all fields but month and day
+        int chrononTime = (hour - timezone / 4) * CHRONON_OF_HOUR + (min - (timezone % 4) * 15) * CHRONON_OF_MINUTE
+                + sec * CHRONON_OF_SECOND + millis;
+        return chrononTime;
+    }
+
+    /**
+     * Get the extended string representation of the given UTC chronon time under the given time zone. Only fields before
+     * the given field index will be returned.
+     * <p/>
+     * The extended string representation is like:<br/>
+     * [-]YYYY-MM-DDThh:mm:ss.xxx[Z|[+|-]hh:mm]
+     * 
+     * @param chrononTime
+     * @param timezone
+     * @param sbder
+     * @param untilField
+     */
+    public void getExtendStringRepWithTimezoneUntilField(long chrononTime, int timezone, StringBuilder sbder,
+            Fields startField, Fields untilField) {
+
+        int year = getYear(chrononTime);
+        int month = getMonthOfYear(chrononTime, year);
+
+        switch (startField) {
+            case YEAR:
+                sbder.append(String.format(year < 0 ? "%05d" : "%04d", year));
+                if (untilField == Fields.YEAR) {
+                    return;
+                }
+            case MONTH:
+                if (startField != Fields.MONTH) {
+                    sbder.append("-");
+                }
+                sbder.append(String.format("%02d", month));
+                if (untilField == Fields.MONTH) {
+                    return;
+                }
+            case DAY:
+                if (startField != Fields.DAY) {
+                    sbder.append("-");
+                }
+                sbder.append(String.format("%02d", getDayOfMonthYear(chrononTime, year, month)));
+                if (untilField == Fields.DAY) {
+                    break;
+                }
+            case HOUR:
+                if (startField != Fields.HOUR) {
+                    sbder.append("T");
+                }
+                sbder.append(String.format("%02d", getHourOfDay(chrononTime)));
+                if (untilField == Fields.HOUR) {
+                    break;
+                }
+            case MINUTE:
+                if (startField != Fields.MINUTE) {
+                    sbder.append(":");
+                }
+                sbder.append(String.format("%02d", getMinOfHour(chrononTime)));
+                if (untilField == Fields.MINUTE) {
+                    break;
+                }
+            case SECOND:
+                if (startField != Fields.SECOND) {
+                    sbder.append(":");
+                }
+                sbder.append(String.format("%02d", getSecOfMin(chrononTime)));
+                // add millisecond as the precision fields of a second
+                sbder.append(".").append(String.format("%03d", getMillisOfSec(chrononTime)));
+                break;
+        }
+
+        if (untilField.compareTo(Fields.DAY) > 0) {
+            sbder.append("Z");
+        } else {
+            short tzMin = (short) ((timezone % 4) * 15);
+            short tzHr = (short) (timezone / 4);
+            sbder.append((tzHr >= 0 ? "+" : "-")).append(String.format("%02d", (tzHr < 0 ? -tzHr : tzHr))).append(":")
+                    .append(String.format("%02d", tzMin));
+        }
+    }
+
+    /**
+     * Get the basic string representation of a chronon time with the given time zone.
+     * 
+     * @param chrononTime
+     * @param timezone
+     * @param sbder
+     */
+    public void getBasicStringRepWithTimezoneUntilField(long chrononTime, int timezone, StringBuilder sbder,
+            Fields startField, Fields untilField) {
+        int year = getYear(chrononTime);
+        int month = getMonthOfYear(chrononTime, year);
+
+        switch (startField) {
+            case YEAR:
+                sbder.append(String.format(year < 0 ? "%05d" : "%04d", year));
+                if (untilField == Fields.YEAR) {
+                    return;
+                }
+            case MONTH:
+                sbder.append(String.format("%02d", month));
+                if (untilField == Fields.MONTH) {
+                    return;
+                }
+            case DAY:
+                sbder.append(String.format("%02d", getDayOfMonthYear(chrononTime, year, month)));
+                if (untilField == Fields.DAY) {
+                    break;
+                }
+            case HOUR:
+                sbder.append(String.format("%02d", getHourOfDay(chrononTime)));
+                if (untilField == Fields.HOUR) {
+                    break;
+                }
+            case MINUTE:
+                sbder.append(String.format("%02d", getMinOfHour(chrononTime)));
+                if (untilField == Fields.MINUTE) {
+                    break;
+                }
+            case SECOND:
+                sbder.append(String.format("%02d", getSecOfMin(chrononTime)));
+                // add millisecond as the precision fields of a second
+                sbder.append(String.format("%03d", getMillisOfSec(chrononTime)));
+                break;
+        }
+
+        if (untilField.compareTo(Fields.DAY) > 0) {
+            sbder.append("Z");
+        } else {
+            short tzMin = (short) ((timezone % 4) * 15);
+            short tzHr = (short) (timezone / 4);
+            sbder.append((tzHr >= 0 ? "+" : "-")).append(String.format("%02d", (tzHr < 0 ? -tzHr : tzHr)))
+                    .append(String.format("%02d", tzMin));
+        }
+    }
+
+    /**
+     * Get the extended string representation of the given months and milliseconds (duration) time. *
+     * <p/>
+     * The extended and simple string representation is like:<br/>
+     * [-]PnYnMnDTnHnMnS
+     * 
+     * @param milliseconds
+     * @param months
+     * @param sbder
+     */
+
+    public void getDurationExtendStringRepWithTimezoneUntilField(long milliseconds, int months, StringBuilder sbder) {
+
+        boolean positive = true;
+
+        // set the negative flag. "||" is necessary in case that months field is not there (so it is 0)
+        if (months < 0 || milliseconds < 0) {
+            months *= -1;
+            milliseconds *= -1;
+            positive = false;
+        }
+
+        int month = getDurationMonth(months);
+        int year = getDurationYear(months);
+        int millisecond = getDurationMillisecond(milliseconds);
+        int second = getDurationSecond(milliseconds);
+        int minute = getDurationMinute(milliseconds);
+        int hour = getDurationHour(milliseconds);
+        int day = getDurationDay(milliseconds);
+
+        if (!positive) {
+            sbder.append("-");
+        }
+        sbder.append("P");
+        sbder.append((year != 0) ? year + "Y" : "");
+        sbder.append((month != 0) ? month + "M" : "");
+        sbder.append((day != 0) ? day + "D" : "");
+        sbder.append((hour != 0 || minute != 0 || second != 0 || millisecond != 0) ? "T" : "");
+        sbder.append((hour != 0) ? hour + "H" : "");
+        sbder.append((minute != 0) ? minute + "M" : "");
+        sbder.append((second != 0 || millisecond != 0) ? second : "");
+        if (millisecond > 0) {
+            sbder.append("." + millisecond);
+        }
+        sbder.append((second != 0 || millisecond != 0) ? "S" : "");
+    }
+
+    /**
+     * Check whether a given year is a leap year.
+     * 
+     * @param year
+     * @return
+     */
+    protected boolean isLeapYear(int year) {
+        return ((year & 3) == 0) && ((year % 100) != 0 || (year % 400) == 0);
+    }
+
+    /**
+     * From Joda library GregorianChronology class: The basic calculation is
+     * (y / 4) - (y / 100) + (y / 400). <br/>
+     * Use y >> 2 ( (y + 3) >> 2 for negative y value) to replace y / 4 reveals eliminates two divisions.
+     * 
+     * @param year
+     * @return
+     */
+    private long chrononizeBeginningOfYear(int year) {
+        int leapYears = year / 100;
+        if (year < 0) {
+            // From Joda library GregorianChronology class
+            // The basic calculation is (y / 4) - (y / 100) + (y / 400)
+            // Use (y + 3) >> 2 to replace y / 4 reveals eliminates two divisions.
+            leapYears = ((year + 3) >> 2) - leapYears + ((leapYears + 3) >> 2) - 1;
+        } else {
+            leapYears = (year >> 2) - leapYears + (leapYears >> 2);
+            if (isLeapYear(year)) {
+                leapYears--;
+            }
+        }
+        return (year * 365L + (leapYears - DAYS_0000_TO_1970)) * CHRONON_OF_DAY;
+    }
+
+    /**
+     * Get the year for the given chronon time.
+     * <p/>
+     * This code is directly from the Joda library BadicChronology.java.<br/>
+     * The original authers are Stephen Colebourne, Brain S O'Neill and Guy Allard, and modified by JArod Wen on May 7th, 2012.
+     * 
+     * @param chrononTime
+     * @return
+     */
+    public int getYear(long chrononTime) {
+        // Get an initial estimate of the year, and the millis value that
+        // represents the start of that year. Then verify estimate and fix if
+        // necessary.
+
+        // Initial estimate uses values divided by two to avoid overflow.
+        long unitMillis = CHRONON_OF_YEAR / 2;
+        long i2 = (chrononTime >> 1) + (1970L * CHRONON_OF_YEAR) / 2;
+        if (i2 < 0) {
+            i2 = i2 - unitMillis + 1;
+        }
+        int year = (int) (i2 / unitMillis);
+
+        long yearStart = chrononizeBeginningOfYear(year);
+        long diff = chrononTime - yearStart;
+
+        if (diff < 0) {
+            year--;
+        } else if (diff >= CHRONON_OF_DAY * 365L) {
+            // One year may need to be added to fix estimate.
+            long oneYear;
+            if (isLeapYear(year)) {
+                oneYear = CHRONON_OF_DAY * 366L;
+            } else {
+                oneYear = CHRONON_OF_DAY * 365L;
+            }
+
+            yearStart += oneYear;
+
+            if (yearStart <= chrononTime) {
+                // Didn't go too far, so actually add one year.
+                year++;
+            }
+        }
+
+        return year;
+    }
+
+    /**
+     * Get the month of the year for the given chronon time and the year.
+     * <p/>
+     * This code is directly from the Joda library BasicGJChronology.java.<br/>
+     * The original authers are Stephen Colebourne, Brain S O'Neill and Guy Allard, and modified by JArod Wen on May 7th, 2012.
+     * <p/>
+     * 
+     * @param millis
+     * @param year
+     * @return
+     */
+    public int getMonthOfYear(long millis, int year) {
+        // Perform a binary search to get the month. To make it go even faster,
+        // compare using ints instead of longs. The number of milliseconds per
+        // year exceeds the limit of a 32-bit int's capacity, so divide by
+        // 1024. No precision is lost (except time of day) since the number of
+        // milliseconds per day contains 1024 as a factor. After the division,
+        // the instant isn't measured in milliseconds, but in units of
+        // (128/125)seconds.
+
+        int i = (int) ((millis - chrononizeBeginningOfYear(year)) >> 10);
+
+        // There are 86400000 milliseconds per day, but divided by 1024 is
+        // 84375. There are 84375 (128/125)seconds per day.
+
+        int leap = 0;
+
+        if (isLeapYear(year) == true) {
+            leap = 1; //Adding one day for the leap years
+        }
+
+        if (i < (181 + leap) * 84375) { /*Days before the end of June*/
+            if (i < (90 + leap) * 84375) { /*Days before the end of March*/
+                if (i < 31 * 84375) { /*Days before the end of January*/
+                    return 1;
+                } else if (i < (59 + leap) * 84375) { /*Days before the end of February*/
+                    return 2;
+                } else {
+                    return 3;
+                }
+            } else if (i < (120 + leap) * 84375) { /*Days before the end of April*/
+                return 4;
+            } else if (i < (151 + leap) * 84375) { /*Days before the end of May*/
+                return 5;
+            } else {
+                return 6;
+            }
+        } else if (i < (273 + leap) * 84375) { /*Days before the end of September*/
+            if (i < (212 + leap) * 84375) { /*Days before the end of July*/
+                return 7;
+            } else if (i < (243 + leap) * 84375) { /*Days before the end of August*/
+                return 8;
+            } else {
+                return 9;
+            }
+        } else if (i < (304 + leap) * 84375) { /*Days before the end of October*/
+            return 10;
+        } else if (i < (334 + leap) * 84375) { /*Days before the end of November*/
+            return 11;
+        } else {
+            return 12;
+        }
+    }
+
+    /**
+     * Get the day of the given month and year for the input chronon time.
+     * <p/>
+     * This function is directly from Joda Library BasicChronology.java.<br/>
+     * The original authers are Stephen Colebourne, Brain S O'Neill and Guy Allard, and modified by JArod Wen on May 7th, 2012.
+     * <p/>
+     * 
+     * @param millis
+     * @param year
+     * @param month
+     * @return
+     */
+    public int getDayOfMonthYear(long millis, int year, int month) {
+        long dateMillis = chrononizeBeginningOfYear(year);
+        dateMillis += DAYS_SINCE_MONTH_BEGIN_ORDI[month - 1] * CHRONON_OF_DAY;
+        if (isLeapYear(year) && month > 2) {
+            dateMillis += CHRONON_OF_DAY;
+        }
+        return (int) ((millis - dateMillis) / CHRONON_OF_DAY) + 1;
+    }
+
+    /**
+     * Get the hour of the day for the given chronon time.
+     * 
+     * @param millis
+     * @return
+     */
+    public int getHourOfDay(long millis) {
+        int hour = (int) ((millis % CHRONON_OF_DAY) / CHRONON_OF_HOUR);
+
+        if (millis < 0) {
+            if (millis % CHRONON_OF_HOUR == 0) {
+                if (hour < 0) {
+                    hour += 24;
+                }
+            } else {
+                hour += 23;
+            }
+        }
+
+        return hour;
+    }
+
+    /**
+     * Get the minute of the hour for the given chronon time.
+     * 
+     * @param millis
+     * @return
+     */
+    public int getMinOfHour(long millis) {
+        int min = (int) ((millis % CHRONON_OF_HOUR) / CHRONON_OF_MINUTE);
+        if (millis < 0) {
+            if (millis % CHRONON_OF_MINUTE == 0) {
+                if (min < 0) {
+                    min += 60;
+                }
+            } else {
+                min += 59;
+            }
+        }
+        return min;
+    }
+
+    /**
+     * Get the second of the minute for the given chronon time.
+     * 
+     * @param millis
+     * @return
+     */
+    public int getSecOfMin(long millis) {
+        int sec = (int) ((millis % CHRONON_OF_MINUTE) / CHRONON_OF_SECOND);
+        if (millis < 0) {
+            if (millis % CHRONON_OF_SECOND == 0) {
+                if (sec < 0) {
+                    sec += 60;
+                }
+            } else {
+                sec += 59;
+            }
+        }
+        return sec;
+    }
+
+    /**
+     * Get the millisecond of the second for the given chronon time.
+     * 
+     * @param millis
+     * @return
+     */
+    public int getMillisOfSec(long millis) {
+        int ms = (int) (millis % CHRONON_OF_SECOND);
+        if (millis < 0 && ms < 0) {
+            ms += 1000;
+        }
+        return ms;
+    }
+
+    public int getDurationMonth(int months) {
+        return (months % 12);
+    }
+
+    public int getDurationYear(int months) {
+        return (months / 12);
+    }
+
+    public int getDurationMillisecond(long milliseconds) {
+        return (int) (milliseconds % 1000);
+    }
+
+    public int getDurationSecond(long milliseconds) {
+        return (int) ((milliseconds % 60000) / 1000);
+    }
+
+    public int getDurationMinute(long milliseconds) {
+        return (int) ((milliseconds % 3600000) / 60000);
+    }
+
+    public int getDurationHour(long milliseconds) {
+        return (int) ((milliseconds % (86400000)) / 3600000);
+    }
+
+    public int getDurationDay(long milliseconds) {
+        return (int) (milliseconds / (86400000));
+    }
+}
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/ICalendarSystem.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/ICalendarSystem.java
new file mode 100644
index 0000000..414a8fe
--- /dev/null
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/ICalendarSystem.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package edu.uci.ics.asterix.om.base.temporal;
+
+public interface ICalendarSystem {
+
+    /**
+     * check whether the given time stamp is valid in the calendar system.
+     * 
+     * @param year
+     * @param month
+     * @param day
+     * @param hour
+     * @param min
+     * @param sec
+     * @param millis
+     * @param timezone
+     * @return
+     */
+    public boolean validate(int year, int month, int day, int hour, int min, int sec, int millis, int timezone);
+
+    /**
+     * get the chronon time for the given time stamp in the calendar system.
+     * 
+     * @param year
+     * @param month
+     * @param day
+     * @param hour
+     * @param min
+     * @param sec
+     * @param millis
+     * @param timezone
+     * @return
+     */
+    public long getChronon(int year, int month, int day, int hour, int min, int sec, int millis, int timezone);
+
+    /**
+     * get the chronon time for the given time in the calendar system
+     * 
+     * @param hour
+     * @param min
+     * @param sec
+     * @param millis
+     * @param timezone
+     * @return
+     */
+    public int getChronon(int hour, int min, int sec, int millis, int timezone);
+
+}
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/ICharSequenceAccessor.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/ICharSequenceAccessor.java
new file mode 100644
index 0000000..6b4e898
--- /dev/null
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/ICharSequenceAccessor.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package edu.uci.ics.asterix.om.base.temporal;
+
+public interface ICharSequenceAccessor<T> {
+
+    public char getCharAt(int index);
+
+    public int getLength();
+
+}
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/StringCharSequenceAccessor.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/StringCharSequenceAccessor.java
new file mode 100644
index 0000000..6c02340
--- /dev/null
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/base/temporal/StringCharSequenceAccessor.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package edu.uci.ics.asterix.om.base.temporal;
+
+public class StringCharSequenceAccessor implements ICharSequenceAccessor<String> {
+
+    private String string;
+    private int offset;
+
+    @Override
+    public char getCharAt(int index) {
+        return string.charAt(index + offset);
+    }
+
+    public void reset(String obj, int offset) {
+        string = obj;
+        this.offset = offset;
+    }
+
+    @Override
+    public int getLength() {
+        return string.length() - offset;
+    }
+
+}
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/functions/AbstractFunctionDescriptor.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/functions/AbstractFunctionDescriptor.java
new file mode 100644
index 0000000..caf3b91
--- /dev/null
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/functions/AbstractFunctionDescriptor.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2009-2012 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package edu.uci.ics.asterix.om.functions;
+
+import edu.uci.ics.asterix.common.functions.FunctionDescriptorTag;
+import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
+import edu.uci.ics.hyracks.algebricks.common.exceptions.NotImplementedException;
+import edu.uci.ics.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import edu.uci.ics.hyracks.algebricks.runtime.base.ICopyAggregateFunctionFactory;
+import edu.uci.ics.hyracks.algebricks.runtime.base.ICopyEvaluatorFactory;
+import edu.uci.ics.hyracks.algebricks.runtime.base.ICopyRunningAggregateFunctionFactory;
+import edu.uci.ics.hyracks.algebricks.runtime.base.ICopySerializableAggregateFunctionFactory;
+import edu.uci.ics.hyracks.algebricks.runtime.base.ICopyUnnestingFunctionFactory;
+
+public abstract class AbstractFunctionDescriptor implements IFunctionDescriptor {
+
+    @Override
+    public abstract FunctionIdentifier getIdentifier();
+
+    @Override
+    public abstract FunctionDescriptorTag getFunctionDescriptorTag();
+
+    @Override
+    public ICopyEvaluatorFactory createEvaluatorFactory(ICopyEvaluatorFactory[] args) throws AlgebricksException {
+        throw new NotImplementedException("Not Implemented");
+    }
+
+    @Override
+    public ICopyRunningAggregateFunctionFactory createRunningAggregateFunctionFactory(ICopyEvaluatorFactory[] args)
+            throws AlgebricksException {
+        throw new NotImplementedException("Not Implemented");
+    }
+
+    @Override
+    public ICopySerializableAggregateFunctionFactory createSerializableAggregateFunctionFactory(
+            ICopyEvaluatorFactory[] args) throws AlgebricksException {
+        throw new NotImplementedException("Not Implemented");
+    }
+
+    @Override
+    public ICopyUnnestingFunctionFactory createUnnestingFunctionFactory(ICopyEvaluatorFactory[] args)
+            throws AlgebricksException {
+        throw new NotImplementedException("Not Implemented");
+    }
+
+    @Override
+    public ICopyAggregateFunctionFactory createAggregateFunctionFactory(ICopyEvaluatorFactory[] args)
+            throws AlgebricksException {
+        throw new NotImplementedException("Not Implemented");
+
+    }
+
+}
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/functions/AsterixBuiltinFunctions.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/functions/AsterixBuiltinFunctions.java
index 2af5d9d..c27be6e 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/functions/AsterixBuiltinFunctions.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/functions/AsterixBuiltinFunctions.java
@@ -163,51 +163,51 @@
             "numeric-idiv", 2);
     public final static FunctionIdentifier CARET = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "caret", 2);
 
-	public final static FunctionIdentifier NUMERIC_ABS = new FunctionIdentifier(
-			FunctionConstants.ASTERIX_NS, "numeric-abs", 1);
-	public final static FunctionIdentifier NUMERIC_CEILING = new FunctionIdentifier(
-			FunctionConstants.ASTERIX_NS, "numeric-ceiling", 1);
-	public final static FunctionIdentifier NUMERIC_FLOOR = new FunctionIdentifier(
-			FunctionConstants.ASTERIX_NS, "numeric-floor", 1);
-	public final static FunctionIdentifier NUMERIC_ROUND = new FunctionIdentifier(
-			FunctionConstants.ASTERIX_NS, "numeric-round", 1);
-	public final static FunctionIdentifier NUMERIC_ROUND_HALF_TO_EVEN = new FunctionIdentifier(
-			FunctionConstants.ASTERIX_NS, "numeric-round-half-to-even", 1);
-	public final static FunctionIdentifier NUMERIC_ROUND_HALF_TO_EVEN2 = new FunctionIdentifier(
-			FunctionConstants.ASTERIX_NS, "numeric-round-half-to-even2", 2);
-	// String funcitons
-	public final static FunctionIdentifier STRING_EQUAL = new FunctionIdentifier(
-			FunctionConstants.ASTERIX_NS, "string-equal", 2);
-	public final static FunctionIdentifier STRING_START_WITH = new FunctionIdentifier(
-			FunctionConstants.ASTERIX_NS, "start-with", 2);
-	public final static FunctionIdentifier STRING_END_WITH = new FunctionIdentifier(
-			FunctionConstants.ASTERIX_NS, "end-with", 2);
-	public final static FunctionIdentifier STRING_MATCHES = new FunctionIdentifier(
-			FunctionConstants.ASTERIX_NS, "matches", 2);
-	public final static FunctionIdentifier STRING_MATCHES_WITH_FLAG = new FunctionIdentifier(
-			FunctionConstants.ASTERIX_NS, "matches2", 3);
-	public final static FunctionIdentifier STRING_LOWERCASE = new FunctionIdentifier(
-			FunctionConstants.ASTERIX_NS, "lowercase", 1);
-	public final static FunctionIdentifier STRING_REPLACE = new FunctionIdentifier(
-			FunctionConstants.ASTERIX_NS, "replace", 3);
-	public final static FunctionIdentifier STRING_REPLACE_WITH_FLAG = new FunctionIdentifier(
-			FunctionConstants.ASTERIX_NS, "replace2", 4);
-	public final static FunctionIdentifier STRING_LENGTH = new FunctionIdentifier(
-			FunctionConstants.ASTERIX_NS, "string-length", 1);
-	public final static FunctionIdentifier SUBSTRING2 = new FunctionIdentifier(
-			FunctionConstants.ASTERIX_NS, "substring2", 2);
-	public final static FunctionIdentifier SUBSTRING_BEFORE = new FunctionIdentifier(
-			FunctionConstants.ASTERIX_NS, "substring-before", 2);
-	public final static FunctionIdentifier SUBSTRING_AFTER = new FunctionIdentifier(
-			FunctionConstants.ASTERIX_NS, "substring-after", 2);
-	public final static FunctionIdentifier STRING_TO_CODEPOINT = new FunctionIdentifier(
-			FunctionConstants.ASTERIX_NS, "string-to-codepoint", 1);
-	public final static FunctionIdentifier CODEPOINT_TO_STRING = new FunctionIdentifier(
-			FunctionConstants.ASTERIX_NS, "codepoint-to-string", 1);
-	public final static FunctionIdentifier STRING_CONCAT = new FunctionIdentifier(
-			FunctionConstants.ASTERIX_NS, "string-concat", 1);
-	public final static FunctionIdentifier STRING_JOIN = new FunctionIdentifier(
-			FunctionConstants.ASTERIX_NS, "string-join", 2);
+    public final static FunctionIdentifier NUMERIC_ABS = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+            "numeric-abs", 1);
+    public final static FunctionIdentifier NUMERIC_CEILING = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+            "numeric-ceiling", 1);
+    public final static FunctionIdentifier NUMERIC_FLOOR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+            "numeric-floor", 1);
+    public final static FunctionIdentifier NUMERIC_ROUND = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+            "numeric-round", 1);
+    public final static FunctionIdentifier NUMERIC_ROUND_HALF_TO_EVEN = new FunctionIdentifier(
+            FunctionConstants.ASTERIX_NS, "numeric-round-half-to-even", 1);
+    public final static FunctionIdentifier NUMERIC_ROUND_HALF_TO_EVEN2 = new FunctionIdentifier(
+            FunctionConstants.ASTERIX_NS, "numeric-round-half-to-even2", 2);
+    // String funcitons
+    public final static FunctionIdentifier STRING_EQUAL = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+            "string-equal", 2);
+    public final static FunctionIdentifier STRING_START_WITH = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+            "start-with", 2);
+    public final static FunctionIdentifier STRING_END_WITH = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+            "end-with", 2);
+    public final static FunctionIdentifier STRING_MATCHES = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+            "matches", 2);
+    public final static FunctionIdentifier STRING_MATCHES_WITH_FLAG = new FunctionIdentifier(
+            FunctionConstants.ASTERIX_NS, "matches2", 3);
+    public final static FunctionIdentifier STRING_LOWERCASE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+            "lowercase", 1);
+    public final static FunctionIdentifier STRING_REPLACE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+            "replace", 3);
+    public final static FunctionIdentifier STRING_REPLACE_WITH_FLAG = new FunctionIdentifier(
+            FunctionConstants.ASTERIX_NS, "replace2", 4);
+    public final static FunctionIdentifier STRING_LENGTH = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+            "string-length", 1);
+    public final static FunctionIdentifier SUBSTRING2 = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+            "substring2", 2);
+    public final static FunctionIdentifier SUBSTRING_BEFORE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+            "substring-before", 2);
+    public final static FunctionIdentifier SUBSTRING_AFTER = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+            "substring-after", 2);
+    public final static FunctionIdentifier STRING_TO_CODEPOINT = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+            "string-to-codepoint", 1);
+    public final static FunctionIdentifier CODEPOINT_TO_STRING = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+            "codepoint-to-string", 1);
+    public final static FunctionIdentifier STRING_CONCAT = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+            "string-concat", 1);
+    public final static FunctionIdentifier STRING_JOIN = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+            "string-join", 2);
 
     public final static FunctionIdentifier DATASET = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "dataset", 1);
     public final static FunctionIdentifier FEED_INGEST = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
@@ -409,9 +409,6 @@
         IFunctionInfo finfo = asterixFunctionIdToInfo.get(fid);
         if (finfo == null) {
             finfo = new AsterixFunctionInfo(fid);
-            //   if (fid.isBuiltin()) {
-            asterixFunctionIdToInfo.put(fid, finfo);
-            //  }
         }
         return finfo;
     }
@@ -530,15 +527,14 @@
         add(NUMERIC_DIVIDE, NonTaggedNumericAddSubMulDivTypeComputer.INSTANCE);
         add(NUMERIC_MOD, NonTaggedNumericAddSubMulDivTypeComputer.INSTANCE);
         add(NUMERIC_IDIV, AInt32TypeComputer.INSTANCE);
-        
-        // Xiaoyu Ma Add for new functions
+
         add(NUMERIC_ABS, NonTaggedNumericUnaryFunctionTypeComputer.INSTANCE);
         add(NUMERIC_CEILING, NonTaggedNumericUnaryFunctionTypeComputer.INSTANCE);
         add(NUMERIC_FLOOR, NonTaggedNumericUnaryFunctionTypeComputer.INSTANCE);
         add(NUMERIC_ROUND, NonTaggedNumericUnaryFunctionTypeComputer.INSTANCE);
         add(NUMERIC_ROUND_HALF_TO_EVEN, NonTaggedNumericUnaryFunctionTypeComputer.INSTANCE);
         add(NUMERIC_ROUND_HALF_TO_EVEN2, NonTaggedNumericRoundHalfToEven2TypeComputer.INSTANCE);
-        
+
         add(STRING_TO_CODEPOINT, OrderedListOfAInt32TypeComputer.INSTANCE);
         add(CODEPOINT_TO_STRING, AStringTypeComputer.INSTANCE);
         add(STRING_CONCAT, AStringTypeComputer.INSTANCE);
@@ -555,7 +551,7 @@
         add(SUBSTRING_AFTER, BinaryStringStringOrNullTypeComputer.INSTANCE);
         add(STRING_EQUAL, BinaryStringBoolOrNullTypeComputer.INSTANCE);
         add(STRING_JOIN, AStringTypeComputer.INSTANCE);
-        
+
         add(OPEN_RECORD_CONSTRUCTOR, OpenRecordConstructorResultType.INSTANCE);
         add(ORDERED_LIST_CONSTRUCTOR, OrderedListConstructorResultType.INSTANCE);
         add(POINT_CONSTRUCTOR, OptionalAPointTypeComputer.INSTANCE);
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/functions/IFunctionDescriptor.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/functions/IFunctionDescriptor.java
index 2fb5447..c372dec 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/functions/IFunctionDescriptor.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/functions/IFunctionDescriptor.java
@@ -1,12 +1,47 @@
+/*
+ * Copyright 2009-2012 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.om.functions;
 
 import java.io.Serializable;
 
 import edu.uci.ics.asterix.common.functions.FunctionDescriptorTag;
+import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
 import edu.uci.ics.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import edu.uci.ics.hyracks.algebricks.runtime.base.ICopyAggregateFunctionFactory;
+import edu.uci.ics.hyracks.algebricks.runtime.base.ICopyEvaluatorFactory;
+import edu.uci.ics.hyracks.algebricks.runtime.base.ICopyRunningAggregateFunctionFactory;
+import edu.uci.ics.hyracks.algebricks.runtime.base.ICopySerializableAggregateFunctionFactory;
+import edu.uci.ics.hyracks.algebricks.runtime.base.ICopyUnnestingFunctionFactory;
 
 public interface IFunctionDescriptor extends Serializable {
     public FunctionIdentifier getIdentifier();
 
     public FunctionDescriptorTag getFunctionDescriptorTag();
+
+    public ICopyEvaluatorFactory createEvaluatorFactory(ICopyEvaluatorFactory[] args) throws AlgebricksException;
+
+    public ICopyRunningAggregateFunctionFactory createRunningAggregateFunctionFactory(final ICopyEvaluatorFactory[] args)
+            throws AlgebricksException;
+
+    public ICopySerializableAggregateFunctionFactory createSerializableAggregateFunctionFactory(
+            final ICopyEvaluatorFactory[] args) throws AlgebricksException;
+
+    public ICopyUnnestingFunctionFactory createUnnestingFunctionFactory(final ICopyEvaluatorFactory[] args)
+            throws AlgebricksException;
+
+    public ICopyAggregateFunctionFactory createAggregateFunctionFactory(final ICopyEvaluatorFactory[] args)
+            throws AlgebricksException;
+
 }
\ No newline at end of file
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/util/NonTaggedFormatUtil.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/util/NonTaggedFormatUtil.java
index e1eaa7c..712843a 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/util/NonTaggedFormatUtil.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/util/NonTaggedFormatUtil.java
@@ -90,8 +90,9 @@
             case INT64:
             case DOUBLE:
             case DATETIME:
-            case DURATION:
                 return 8;
+            case DURATION:
+                return 12;
             case POINT:
                 return 16;
             case POINT3D:
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/base/AbstractAggregateFunctionDynamicDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/base/AbstractAggregateFunctionDynamicDescriptor.java
index 07d8141..09325e4 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/base/AbstractAggregateFunctionDynamicDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/base/AbstractAggregateFunctionDynamicDescriptor.java
@@ -1,12 +1,14 @@
 package edu.uci.ics.asterix.runtime.aggregates.base;
 
 import edu.uci.ics.asterix.common.functions.FunctionDescriptorTag;
-import edu.uci.ics.asterix.runtime.base.IAggregateFunctionDynamicDescriptor;
+import edu.uci.ics.asterix.om.functions.AbstractFunctionDescriptor;
 
-public abstract class AbstractAggregateFunctionDynamicDescriptor implements IAggregateFunctionDynamicDescriptor {
+public abstract class AbstractAggregateFunctionDynamicDescriptor extends AbstractFunctionDescriptor  {
     private static final long serialVersionUID = 1L;
 
     public FunctionDescriptorTag getFunctionDescriptorTag() {
         return FunctionDescriptorTag.AGGREGATE;
     }
+
+   
 }
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/base/AbstractSerializableAggregateFunctionDynamicDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/base/AbstractSerializableAggregateFunctionDynamicDescriptor.java
index 0634868..abde117 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/base/AbstractSerializableAggregateFunctionDynamicDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/base/AbstractSerializableAggregateFunctionDynamicDescriptor.java
@@ -1,10 +1,9 @@
 package edu.uci.ics.asterix.runtime.aggregates.base;
 
 import edu.uci.ics.asterix.common.functions.FunctionDescriptorTag;
-import edu.uci.ics.asterix.runtime.base.ISerializableAggregateFunctionDynamicDescriptor;
+import edu.uci.ics.asterix.om.functions.AbstractFunctionDescriptor;
 
-public abstract class AbstractSerializableAggregateFunctionDynamicDescriptor implements
-        ISerializableAggregateFunctionDynamicDescriptor {
+public abstract class AbstractSerializableAggregateFunctionDynamicDescriptor extends AbstractFunctionDescriptor {
     private static final long serialVersionUID = 1L;
 
     @Override
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableAvgAggregateDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableAvgAggregateDescriptor.java
index 057c274..6c9989d 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableAvgAggregateDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableAvgAggregateDescriptor.java
@@ -48,8 +48,8 @@
     }
 
     @Override
-    public ICopySerializableAggregateFunctionFactory createAggregateFunctionFactory(ICopyEvaluatorFactory[] args)
-            throws AlgebricksException {
+    public ICopySerializableAggregateFunctionFactory createSerializableAggregateFunctionFactory(
+            ICopyEvaluatorFactory[] args) throws AlgebricksException {
         final ICopyEvaluatorFactory[] evals = args;
 
         return new ICopySerializableAggregateFunctionFactory() {
@@ -89,8 +89,8 @@
                         boolean metNull = BufferSerDeUtil.getBoolean(state, start + 16);
                         if (inputVal.getLength() > 0) {
                             ++count;
-                            ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER
-                                    .deserialize(inputVal.getByteArray()[0]);
+                            ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(inputVal
+                                    .getByteArray()[0]);
                             switch (typeTag) {
                                 case INT8: {
                                     byte val = AInt8SerializerDeserializer.getByte(inputVal.getByteArray(), 1);
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableCountAggregateDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableCountAggregateDescriptor.java
index 98e86d2..d8f2553 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableCountAggregateDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableCountAggregateDescriptor.java
@@ -39,7 +39,7 @@
     }
 
     @Override
-    public ICopySerializableAggregateFunctionFactory createAggregateFunctionFactory(final ICopyEvaluatorFactory[] args)
+    public ICopySerializableAggregateFunctionFactory createSerializableAggregateFunctionFactory(final ICopyEvaluatorFactory[] args)
             throws AlgebricksException {
         return new ICopySerializableAggregateFunctionFactory() {
             private static final long serialVersionUID = 1L;
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableGlobalAvgAggregateDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableGlobalAvgAggregateDescriptor.java
index 244ffae..9c8427a 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableGlobalAvgAggregateDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableGlobalAvgAggregateDescriptor.java
@@ -55,7 +55,7 @@
     }
 
     @Override
-    public ICopySerializableAggregateFunctionFactory createAggregateFunctionFactory(ICopyEvaluatorFactory[] args)
+    public ICopySerializableAggregateFunctionFactory createSerializableAggregateFunctionFactory(ICopyEvaluatorFactory[] args)
             throws AlgebricksException {
         final ICopyEvaluatorFactory[] evals = args;
         List<IAType> unionList = new ArrayList<IAType>();
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableLocalAvgAggregateDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableLocalAvgAggregateDescriptor.java
index 7be8bd0..99d28ae 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableLocalAvgAggregateDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableLocalAvgAggregateDescriptor.java
@@ -59,7 +59,7 @@
     }
 
     @Override
-    public ICopySerializableAggregateFunctionFactory createAggregateFunctionFactory(ICopyEvaluatorFactory[] args)
+    public ICopySerializableAggregateFunctionFactory createSerializableAggregateFunctionFactory(ICopyEvaluatorFactory[] args)
             throws AlgebricksException {
         final ICopyEvaluatorFactory[] evals = args;
         List<IAType> unionList = new ArrayList<IAType>();
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableLocalSumAggregateDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableLocalSumAggregateDescriptor.java
index d080b27..6badf0f 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableLocalSumAggregateDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableLocalSumAggregateDescriptor.java
@@ -11,7 +11,7 @@
 import edu.uci.ics.hyracks.algebricks.runtime.base.ICopySerializableAggregateFunctionFactory;
 
 public class SerializableLocalSumAggregateDescriptor extends AbstractSerializableAggregateFunctionDynamicDescriptor {
-    
+
     private static final long serialVersionUID = 1L;
     private final static FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
             "local-sum-serial", 1);
@@ -27,8 +27,8 @@
     }
 
     @Override
-    public ICopySerializableAggregateFunctionFactory createAggregateFunctionFactory(final ICopyEvaluatorFactory[] args)
-            throws AlgebricksException {
+    public ICopySerializableAggregateFunctionFactory createSerializableAggregateFunctionFactory(
+            final ICopyEvaluatorFactory[] args) throws AlgebricksException {
         return new ICopySerializableAggregateFunctionFactory() {
             private static final long serialVersionUID = 1L;
 
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableSumAggregateDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableSumAggregateDescriptor.java
index b97e35b..7100ffb 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableSumAggregateDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableSumAggregateDescriptor.java
@@ -26,7 +26,7 @@
     }
 
     @Override
-    public ICopySerializableAggregateFunctionFactory createAggregateFunctionFactory(final ICopyEvaluatorFactory[] args)
+    public ICopySerializableAggregateFunctionFactory createSerializableAggregateFunctionFactory(final ICopyEvaluatorFactory[] args)
             throws AlgebricksException {
         return new ICopySerializableAggregateFunctionFactory() {
             private static final long serialVersionUID = 1L;           
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/base/IAggregateFunctionDynamicDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/base/IAggregateFunctionDynamicDescriptor.java
deleted file mode 100644
index 95c604a..0000000
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/base/IAggregateFunctionDynamicDescriptor.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package edu.uci.ics.asterix.runtime.base;
-
-import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
-import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
-import edu.uci.ics.hyracks.algebricks.runtime.base.ICopyAggregateFunctionFactory;
-import edu.uci.ics.hyracks.algebricks.runtime.base.ICopyEvaluatorFactory;
-
-public interface IAggregateFunctionDynamicDescriptor extends IFunctionDescriptor {
-    public ICopyAggregateFunctionFactory createAggregateFunctionFactory(final ICopyEvaluatorFactory[] args)
-            throws AlgebricksException;
-}
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/base/IRunningAggregateFunctionDynamicDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/base/IRunningAggregateFunctionDynamicDescriptor.java
deleted file mode 100644
index 7ab7261..0000000
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/base/IRunningAggregateFunctionDynamicDescriptor.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package edu.uci.ics.asterix.runtime.base;
-
-
-import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
-import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
-import edu.uci.ics.hyracks.algebricks.runtime.base.ICopyEvaluatorFactory;
-import edu.uci.ics.hyracks.algebricks.runtime.base.ICopyRunningAggregateFunctionFactory;
-
-public interface IRunningAggregateFunctionDynamicDescriptor extends IFunctionDescriptor {
-    public ICopyRunningAggregateFunctionFactory createRunningAggregateFunctionFactory(final ICopyEvaluatorFactory[] args)
-            throws AlgebricksException;
-}
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/base/IScalarFunctionDynamicDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/base/IScalarFunctionDynamicDescriptor.java
deleted file mode 100644
index 8e4353e..0000000
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/base/IScalarFunctionDynamicDescriptor.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package edu.uci.ics.asterix.runtime.base;
-
-
-import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
-import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
-import edu.uci.ics.hyracks.algebricks.runtime.base.ICopyEvaluatorFactory;
-
-public interface IScalarFunctionDynamicDescriptor extends IFunctionDescriptor {
-    public ICopyEvaluatorFactory createEvaluatorFactory(ICopyEvaluatorFactory[] args) throws AlgebricksException;
-}
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/base/ISerializableAggregateFunctionDynamicDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/base/ISerializableAggregateFunctionDynamicDescriptor.java
deleted file mode 100644
index 810af16..0000000
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/base/ISerializableAggregateFunctionDynamicDescriptor.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package edu.uci.ics.asterix.runtime.base;
-
-import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
-import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
-import edu.uci.ics.hyracks.algebricks.runtime.base.ICopyEvaluatorFactory;
-import edu.uci.ics.hyracks.algebricks.runtime.base.ICopySerializableAggregateFunctionFactory;
-
-public interface ISerializableAggregateFunctionDynamicDescriptor extends IFunctionDescriptor {
-    public ICopySerializableAggregateFunctionFactory createAggregateFunctionFactory(final ICopyEvaluatorFactory[] args)
-            throws AlgebricksException;
-}
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/base/IUnnestingFunctionDynamicDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/base/IUnnestingFunctionDynamicDescriptor.java
deleted file mode 100644
index 3f55539..0000000
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/base/IUnnestingFunctionDynamicDescriptor.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package edu.uci.ics.asterix.runtime.base;
-
-import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
-import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
-import edu.uci.ics.hyracks.algebricks.runtime.base.ICopyEvaluatorFactory;
-import edu.uci.ics.hyracks.algebricks.runtime.base.ICopyUnnestingFunctionFactory;
-
-public interface IUnnestingFunctionDynamicDescriptor extends IFunctionDescriptor {
-    public ICopyUnnestingFunctionFactory createUnnestingFunctionFactory(final ICopyEvaluatorFactory[] args)
-            throws AlgebricksException;
-}
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/base/AbstractScalarFunctionDynamicDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/base/AbstractScalarFunctionDynamicDescriptor.java
index 06aa928..a2f00ff 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/base/AbstractScalarFunctionDynamicDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/base/AbstractScalarFunctionDynamicDescriptor.java
@@ -1,9 +1,9 @@
 package edu.uci.ics.asterix.runtime.evaluators.base;
 
 import edu.uci.ics.asterix.common.functions.FunctionDescriptorTag;
-import edu.uci.ics.asterix.runtime.base.IScalarFunctionDynamicDescriptor;
+import edu.uci.ics.asterix.om.functions.AbstractFunctionDescriptor;
 
-public abstract class AbstractScalarFunctionDynamicDescriptor implements IScalarFunctionDynamicDescriptor {
+public abstract class AbstractScalarFunctionDynamicDescriptor extends AbstractFunctionDescriptor {
 
     private static final long serialVersionUID = 1L;
 
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ABooleanConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ABooleanConstructorDescriptor.java
index 0c189bb..8b9f665 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ABooleanConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ABooleanConstructorDescriptor.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.runtime.evaluators.constructors;
 
 import java.io.DataOutput;
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ACircleConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ACircleConstructorDescriptor.java
index a618b29..3d22c11 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ACircleConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ACircleConstructorDescriptor.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.runtime.evaluators.constructors;
 
 import java.io.DataOutput;
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADateConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADateConstructorDescriptor.java
index 4d5d3f9..ba48742 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADateConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADateConstructorDescriptor.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.runtime.evaluators.constructors;
 
 import java.io.DataOutput;
@@ -8,6 +22,9 @@
 import edu.uci.ics.asterix.om.base.ADate;
 import edu.uci.ics.asterix.om.base.AMutableDate;
 import edu.uci.ics.asterix.om.base.ANull;
+import edu.uci.ics.asterix.om.base.temporal.ByteArrayCharSequenceAccessor;
+import edu.uci.ics.asterix.om.base.temporal.ADateAndTimeParser;
+import edu.uci.ics.asterix.om.base.temporal.GregorianCalendarSystem;
 import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
 import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
 import edu.uci.ics.asterix.om.types.ATypeTag;
@@ -28,6 +45,9 @@
     public final static FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "date", 1);
     private final static byte SER_STRING_TYPE_TAG = ATypeTag.STRING.serialize();
     private final static byte SER_NULL_TYPE_TAG = ATypeTag.NULL.serialize();
+
+    private final static ByteArrayCharSequenceAccessor charAccessor = new ByteArrayCharSequenceAccessor();
+
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
         public IFunctionDescriptor createFunctionDescriptor() {
             return new ADateConstructorDescriptor();
@@ -47,12 +67,8 @@
 
                     private ArrayBackedValueStorage outInput = new ArrayBackedValueStorage();
                     private ICopyEvaluator eval = args[0].createEvaluator(outInput);
-                    private int offset;
-                    private short year, month, day, hour, minute, value;
-                    private byte timezonePart = 0;
-                    private boolean positive = true;
                     private String errorMessage = "This can not be an instance of date";
-                    private AMutableDate aDate = new AMutableDate(0, 0, 0, 0);
+                    private AMutableDate aDate = new AMutableDate(0);
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ADate> dateSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ADATE);
@@ -68,73 +84,30 @@
                             eval.evaluate(tuple);
                             byte[] serString = outInput.getByteArray();
                             if (serString[0] == SER_STRING_TYPE_TAG) {
-                                offset = 3;
 
-                                if (serString[offset] == '-') {
-                                    offset++;
-                                    positive = false;
+                                charAccessor.reset(serString, 3, 0);
+                                long chrononTimeInMs = ADateAndTimeParser.parseDatePart(charAccessor, true);
+
+                                short temp = 0;
+                                if (chrononTimeInMs < 0
+                                        && chrononTimeInMs % GregorianCalendarSystem.CHRONON_OF_DAY != 0) {
+                                    temp = 1;
                                 }
 
-                                if (serString[offset + 4] != '-' || serString[offset + 7] != '-')
-                                    throw new AlgebricksException(errorMessage);
+                                aDate.setValue((int) (chrononTimeInMs / GregorianCalendarSystem.CHRONON_OF_DAY) - temp);
 
-                                year = getValue(serString, offset, 4);
-                                month = getValue(serString, offset + 5, 2);
-                                day = getValue(serString, offset + 8, 2);
-
-                                if (year < 0 || year > 9999 || month < 0 || month > 12 || day < 0 || day > 31)
-                                    throw new AlgebricksException(errorMessage);
-
-                                offset += 10;
-
-                                if (outInput.getLength() > offset) {
-                                    if (serString[offset] == 'Z')
-                                        timezonePart = 0;
-                                    else {
-                                        if ((serString[offset] != '+' && serString[offset] != '-')
-                                                || (serString[offset + 3] != ':'))
-                                            throw new AlgebricksException(errorMessage);
-
-                                        hour = getValue(serString, offset + 1, 2);
-                                        minute = getValue(serString, offset + 4, 2);
-
-                                        if (hour < 0 || hour > 24 || (hour == 24 && minute != 0)
-                                                || (minute != 0 && minute != 15 && minute != 30 && minute != 45))
-                                            throw new AlgebricksException(errorMessage);
-
-                                        if (serString[offset] == '-')
-                                            timezonePart = (byte) -((hour * 4) + minute / 15);
-                                        else
-                                            timezonePart = (byte) ((hour * 4) + minute / 15);
-                                    }
-
-                                }
-
-                                if (!positive)
-                                    year *= -1;
-
-                                aDate.setValue(year, month, day, timezonePart);
                                 dateSerde.serialize(aDate, out);
-                            } else if (serString[0] == SER_NULL_TYPE_TAG)
+                            } else if (serString[0] == SER_NULL_TYPE_TAG) {
                                 nullSerde.serialize(ANull.NULL, out);
-                            else
+                            } else {
                                 throw new AlgebricksException(errorMessage);
+                            }
                         } catch (IOException e1) {
                             throw new AlgebricksException(errorMessage);
+                        } catch (Exception e2) {
+                            throw new AlgebricksException(e2);
                         }
                     }
-
-                    private short getValue(byte[] b, int offset, int numberOfDigits) throws AlgebricksException {
-                        value = 0;
-                        for (int i = 0; i < numberOfDigits; i++) {
-                            if ((b[offset] >= '0' && b[offset] <= '9'))
-                                value = (short) (value * 10 + b[offset++] - '0');
-                            else
-                                throw new AlgebricksException(errorMessage);
-
-                        }
-                        return value;
-                    }
                 };
             }
         };
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADateTimeConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADateTimeConstructorDescriptor.java
index 2705f74..49a4734 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADateTimeConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADateTimeConstructorDescriptor.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.runtime.evaluators.constructors;
 
 import java.io.DataOutput;
@@ -8,6 +22,8 @@
 import edu.uci.ics.asterix.om.base.ADateTime;
 import edu.uci.ics.asterix.om.base.AMutableDateTime;
 import edu.uci.ics.asterix.om.base.ANull;
+import edu.uci.ics.asterix.om.base.temporal.ByteArrayCharSequenceAccessor;
+import edu.uci.ics.asterix.om.base.temporal.ADateAndTimeParser;
 import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
 import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
 import edu.uci.ics.asterix.om.types.ATypeTag;
@@ -28,6 +44,9 @@
     public final static FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "datetime", 1);
     private final static byte SER_STRING_TYPE_TAG = ATypeTag.STRING.serialize();
     private final static byte SER_NULL_TYPE_TAG = ATypeTag.NULL.serialize();
+
+    private final static ByteArrayCharSequenceAccessor charAccessor = new ByteArrayCharSequenceAccessor();
+
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
         public IFunctionDescriptor createFunctionDescriptor() {
             return new ADateTimeConstructorDescriptor();
@@ -47,12 +66,8 @@
 
                     private ArrayBackedValueStorage outInput = new ArrayBackedValueStorage();
                     private ICopyEvaluator eval = args[0].createEvaluator(outInput);
-                    private int offset;
-                    private short hour, minute, second, msecond, year, month, day, timezoneHour, timezoneMinute, value;
-                    private byte timezonePart = 0;
-                    private boolean positive = true;
                     private String errorMessage = "This can not be an instance of datetime";
-                    private AMutableDateTime aDateTime = new AMutableDateTime(0, 0, 0, 0, 0, 0, 0, 0, 0);
+                    private AMutableDateTime aDateTime = new AMutableDateTime(0L);
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ADateTime> datetimeSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ADATETIME);
@@ -68,100 +83,39 @@
                             eval.evaluate(tuple);
                             byte[] serString = outInput.getByteArray();
                             if (serString[0] == SER_STRING_TYPE_TAG) {
+                                charAccessor.reset(serString, 3, 0);
 
-                                offset = 3;
-                                if (serString[offset] == '-') {
-                                    offset++;
-                                    positive = false;
+                                // +1 if it is negative (-)
+                                short timeOffset = (short) ((charAccessor.getCharAt(0) == '-') ? 1 : 0);
+
+                                if (charAccessor.getCharAt(timeOffset + 10) != 'T'
+                                        && charAccessor.getCharAt(timeOffset + 8) != 'T') {
+                                    throw new AlgebricksException(errorMessage + ": missing T");
                                 }
 
-                                if (serString[offset + 4] != '-' || serString[offset + 7] != '-')
-                                    throw new AlgebricksException(errorMessage);
+                                // if extended form 11, else 9
+                                timeOffset += (charAccessor.getCharAt(timeOffset + 13) == ':') ? (short) (11)
+                                        : (short) (9);
 
-                                year = getValue(serString, offset, 4);
-                                month = getValue(serString, offset + 5, 2);
-                                day = getValue(serString, offset + 8, 2);
+                                long chrononTimeInMs = ADateAndTimeParser.parseDatePart(charAccessor, false);
 
-                                if (year < 0 || year > 9999 || month < 0 || month > 12 || day < 0 || day > 31)
-                                    throw new AlgebricksException(errorMessage);
+                                charAccessor.reset(serString, 3, timeOffset);
 
-                                if (!positive)
-                                    year *= -1;
+                                chrononTimeInMs += ADateAndTimeParser.parseTimePart(charAccessor);
 
-                                if (serString[offset + 10] != 'T')
-                                    throw new AlgebricksException(errorMessage);
-
-                                offset += 11;
-
-                                if (serString[offset + 2] != ':' || serString[offset + 5] != ':')
-                                    throw new AlgebricksException(errorMessage);
-
-                                hour = getValue(serString, offset, 2);
-                                minute = getValue(serString, offset + 3, 2);
-                                second = getValue(serString, offset + 6, 2);
-
-                                msecond = 0;
-                                if (serString[offset + 8] == ':') {
-                                    msecond = getValue(serString, offset + 9, 3);
-                                    if (hour < 0 || hour > 24 || minute < 0 || minute > 59 || second < 0 || second > 59
-                                            || msecond < 0 || msecond > 999
-                                            || (hour == 24 && (minute != 0 || second != 0 || msecond != 0)))
-                                        throw new AlgebricksException(errorMessage);
-                                    offset += 12;
-                                } else {
-                                    if (hour < 0 || hour > 24 || minute < 0 || minute > 59 || second < 0 || second > 59
-                                            || (hour == 24 && (minute != 0 || second != 0)))
-                                        throw new AlgebricksException(errorMessage);
-                                    offset += 8;
-                                }
-
-                                if (outInput.getLength() > offset) {
-                                    if (serString[offset] == 'Z')
-                                        timezonePart = 0;
-                                    else {
-                                        if ((serString[offset] != '+' && serString[offset] != '-')
-                                                || (serString[offset + 3] != ':'))
-                                            throw new AlgebricksException(errorMessage);
-
-                                        timezoneHour = getValue(serString, offset + 1, 2);
-                                        timezoneMinute = getValue(serString, offset + 4, 2);
-
-                                        if (timezoneHour < 0
-                                                || timezoneHour > 24
-                                                || (timezoneHour == 24 && timezoneMinute != 0)
-                                                || (timezoneMinute != 0 && timezoneMinute != 15 && timezoneMinute != 30 && timezoneMinute != 45))
-                                            throw new AlgebricksException(errorMessage);
-
-                                        if (serString[offset] == '-')
-                                            timezonePart = (byte) -((timezoneHour * 4) + timezoneMinute / 15);
-                                        else
-                                            timezonePart = (byte) ((timezoneHour * 4) + timezoneMinute / 15);
-                                    }
-
-                                }
-
-                                aDateTime.setValue(year, month, day, hour, minute, second, msecond, 0, timezonePart);
+                                aDateTime.setValue(chrononTimeInMs);
                                 datetimeSerde.serialize(aDateTime, out);
-                            } else if (serString[0] == SER_NULL_TYPE_TAG)
+                            } else if (serString[0] == SER_NULL_TYPE_TAG) {
                                 nullSerde.serialize(ANull.NULL, out);
-                            else
+                            } else {
                                 throw new AlgebricksException(errorMessage);
+                            }
                         } catch (IOException e1) {
                             throw new AlgebricksException(errorMessage);
+                        } catch (Exception e2) {
+                            throw new AlgebricksException(e2);
                         }
                     }
-
-                    private short getValue(byte[] b, int offset, int numberOfDigits) throws AlgebricksException {
-                        value = 0;
-                        for (int i = 0; i < numberOfDigits; i++) {
-                            if ((b[offset] >= '0' && b[offset] <= '9'))
-                                value = (short) (value * 10 + b[offset++] - '0');
-                            else
-                                throw new AlgebricksException(errorMessage);
-
-                        }
-                        return value;
-                    }
                 };
             }
         };
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADoubleConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADoubleConstructorDescriptor.java
index 3aae018..8a837e9 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADoubleConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADoubleConstructorDescriptor.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.runtime.evaluators.constructors;
 
 import java.io.DataOutput;
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADurationConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADurationConstructorDescriptor.java
index 6e24198..977bee1 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADurationConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ADurationConstructorDescriptor.java
@@ -1,13 +1,28 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.runtime.evaluators.constructors;
 
 import java.io.DataOutput;
-import java.io.IOException;
 
 import edu.uci.ics.asterix.common.functions.FunctionConstants;
 import edu.uci.ics.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
 import edu.uci.ics.asterix.om.base.ADuration;
 import edu.uci.ics.asterix.om.base.AMutableDuration;
 import edu.uci.ics.asterix.om.base.ANull;
+import edu.uci.ics.asterix.om.base.temporal.ADurationParser;
+import edu.uci.ics.asterix.om.base.temporal.ByteArrayCharSequenceAccessor;
 import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
 import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
 import edu.uci.ics.asterix.om.types.ATypeTag;
@@ -28,6 +43,9 @@
     public final static FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "duration", 1);
     private final static byte SER_STRING_TYPE_TAG = ATypeTag.STRING.serialize();
     private final static byte SER_NULL_TYPE_TAG = ATypeTag.NULL.serialize();
+
+    private final static ByteArrayCharSequenceAccessor charAccessor = new ByteArrayCharSequenceAccessor();
+
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
         public IFunctionDescriptor createFunctionDescriptor() {
             return new ADurationConstructorDescriptor();
@@ -47,10 +65,6 @@
 
                     private ArrayBackedValueStorage outInput = new ArrayBackedValueStorage();
                     private ICopyEvaluator eval = args[0].createEvaluator(outInput);
-                    private int offset;
-                    private int value = 0, hour = 0, minute = 0, second = 0, year = 0, month = 0, day = 0;
-                    private boolean isYear = true, isMonth = true, isDay = true, isHour = true, isMinute = true,
-                            isSecond = true, isTime = false, timeItem = true, positive = true;
                     private String errorMessage = "This can not be an instance of duration";
                     private AMutableDuration aDuration = new AMutableDuration(0, 0);
                     @SuppressWarnings("unchecked")
@@ -67,120 +81,21 @@
                             outInput.reset();
                             eval.evaluate(tuple);
                             byte[] serString = outInput.getByteArray();
+
                             if (serString[0] == SER_STRING_TYPE_TAG) {
-                                offset = 3;
-                                if (serString[offset] == '-') {
-                                    offset++;
-                                    positive = false;
-                                }
-                                if (serString[offset++] != 'D')
-                                    throw new AlgebricksException(errorMessage);
 
-                                for (; offset < outInput.getLength(); offset++) {
-                                    if (serString[offset] >= '0' && serString[offset] <= '9')
-                                        value = value * 10 + serString[offset] - '0';
-                                    else {
-                                        switch (serString[offset]) {
-                                            case 'Y':
-                                                if (isYear) {
-                                                    year = value;
-                                                    isYear = false;
-                                                } else
-                                                    throw new AlgebricksException(errorMessage);
-                                                break;
-                                            case 'M':
-                                                if (!isTime) {
-                                                    if (isMonth) {
-                                                        if (value < 0 || value > 11)
-                                                            throw new AlgebricksException(errorMessage);
-                                                        else {
-                                                            month = value;
-                                                            isMonth = false;
-                                                        }
-                                                    } else
-                                                        throw new AlgebricksException(errorMessage);
-                                                } else if (isMinute) {
-                                                    if (value < 0 || value > 59)
-                                                        throw new AlgebricksException(errorMessage);
-                                                    else {
-                                                        minute = value;
-                                                        isMinute = false;
-                                                        timeItem = false;
-                                                    }
-                                                } else
-                                                    throw new AlgebricksException(errorMessage);
-                                                break;
-                                            case 'D':
-                                                if (isDay) {
-                                                    if (value < 0 || value > 30)
-                                                        throw new AlgebricksException(errorMessage);
-                                                    else {
-                                                        day = value;
-                                                        isDay = false;
-                                                    }
-                                                } else
-                                                    throw new AlgebricksException(errorMessage);
-                                                break;
-                                            case 'T':
-                                                if (!isTime) {
-                                                    isTime = true;
-                                                    timeItem = true;
-                                                } else
-                                                    throw new AlgebricksException(errorMessage);
-                                                break;
+                                charAccessor.reset(serString, 3, 0);
 
-                                            case 'H':
-                                                if (isHour) {
-                                                    if (value < 0 || value > 23)
-                                                        throw new AlgebricksException(errorMessage);
-                                                    else {
-                                                        hour = value;
-                                                        isHour = false;
-                                                        timeItem = false;
-                                                    }
-                                                } else
-                                                    throw new AlgebricksException(errorMessage);
-                                                break;
-                                            case 'S':
-                                                if (isSecond) {
-                                                    if (value < 0 || value > 59)
-                                                        throw new AlgebricksException(errorMessage);
-                                                    else {
-                                                        second = value;
-                                                        isSecond = false;
-                                                        timeItem = false;
-                                                    }
-                                                } else
-                                                    throw new AlgebricksException(errorMessage);
-                                                break;
-                                            default:
-                                                throw new AlgebricksException(errorMessage);
+                                ADurationParser.parse(charAccessor, aDuration);
 
-                                        }
-                                        value = 0;
-                                    }
-                                }
-
-                                if (isTime && timeItem)
-                                    throw new AlgebricksException(errorMessage);
-
-                                if (isYear && isMonth && isDay && !isTime)
-                                    throw new AlgebricksException(errorMessage);
-
-                                if (positive)
-                                    aDuration.setValue(year * 12 + month, day * 24 * 3600 + 3600 * hour + 60 * minute
-                                            + second);
-                                else
-                                    aDuration.setValue(-1 * (year * 12 + month), -1
-                                            * (day * 24 * 3600 + 3600 * hour + 60 * minute + second));
                                 durationSerde.serialize(aDuration, out);
-                            } else if (serString[0] == SER_NULL_TYPE_TAG)
+                            } else if (serString[0] == SER_NULL_TYPE_TAG) {
                                 nullSerde.serialize(ANull.NULL, out);
-                            else
+                            } else {
                                 throw new AlgebricksException(errorMessage);
-
-                        } catch (IOException e1) {
-                            throw new AlgebricksException(errorMessage);
+                            }
+                        } catch (Exception e1) {
+                            throw new AlgebricksException(e1);
                         }
                     }
                 };
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AFloatConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AFloatConstructorDescriptor.java
index 634f7e0..df5ed8c 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AFloatConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AFloatConstructorDescriptor.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.runtime.evaluators.constructors;
 
 import java.io.DataOutput;
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AInt16ConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AInt16ConstructorDescriptor.java
index d632202..41ac615 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AInt16ConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AInt16ConstructorDescriptor.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.runtime.evaluators.constructors;
 
 import java.io.DataOutput;
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AInt32ConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AInt32ConstructorDescriptor.java
index 1919c28..1327b30 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AInt32ConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AInt32ConstructorDescriptor.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.runtime.evaluators.constructors;
 
 import java.io.DataOutput;
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AInt64ConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AInt64ConstructorDescriptor.java
index 4702691..de480fa 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AInt64ConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AInt64ConstructorDescriptor.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.runtime.evaluators.constructors;
 
 import java.io.DataOutput;
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AInt8ConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AInt8ConstructorDescriptor.java
index 1e9fa47..8721116 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AInt8ConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AInt8ConstructorDescriptor.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.runtime.evaluators.constructors;
 
 import java.io.DataOutput;
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ALineConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ALineConstructorDescriptor.java
index 00265bd..84e7295 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ALineConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ALineConstructorDescriptor.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.runtime.evaluators.constructors;
 
 import java.io.DataOutput;
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ANullConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ANullConstructorDescriptor.java
index 89765be..89ea420 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ANullConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ANullConstructorDescriptor.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.runtime.evaluators.constructors;
 
 import java.io.DataOutput;
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/APoint3DConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/APoint3DConstructorDescriptor.java
index dbbfe08..4ae4725 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/APoint3DConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/APoint3DConstructorDescriptor.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.runtime.evaluators.constructors;
 
 import java.io.DataOutput;
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/APointConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/APointConstructorDescriptor.java
index 78db761..dc3234e 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/APointConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/APointConstructorDescriptor.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.runtime.evaluators.constructors;
 
 import java.io.DataOutput;
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/APolygonConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/APolygonConstructorDescriptor.java
index 51812a1..b856bff 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/APolygonConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/APolygonConstructorDescriptor.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.runtime.evaluators.constructors;
 
 import java.io.DataOutput;
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ARectangleConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ARectangleConstructorDescriptor.java
index b4cdab5..9d2385f 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ARectangleConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ARectangleConstructorDescriptor.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.runtime.evaluators.constructors;
 
 import java.io.DataOutput;
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AStringConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AStringConstructorDescriptor.java
index e7919b3..70b35e3 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AStringConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AStringConstructorDescriptor.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.runtime.evaluators.constructors;
 
 import java.io.DataOutput;
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ATimeConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ATimeConstructorDescriptor.java
index 0798383..48c06b0 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ATimeConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/ATimeConstructorDescriptor.java
@@ -1,3 +1,17 @@
+/*
+ * Copyright 2009-2011 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package edu.uci.ics.asterix.runtime.evaluators.constructors;
 
 import java.io.DataOutput;
@@ -8,6 +22,8 @@
 import edu.uci.ics.asterix.om.base.AMutableTime;
 import edu.uci.ics.asterix.om.base.ANull;
 import edu.uci.ics.asterix.om.base.ATime;
+import edu.uci.ics.asterix.om.base.temporal.ByteArrayCharSequenceAccessor;
+import edu.uci.ics.asterix.om.base.temporal.ADateAndTimeParser;
 import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
 import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
 import edu.uci.ics.asterix.om.types.ATypeTag;
@@ -28,6 +44,7 @@
     public final static FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "time", 1);
     private final static byte SER_STRING_TYPE_TAG = ATypeTag.STRING.serialize();
     private final static byte SER_NULL_TYPE_TAG = ATypeTag.NULL.serialize();
+    private final static ByteArrayCharSequenceAccessor charAccessor = new ByteArrayCharSequenceAccessor();
 
     public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
         public IFunctionDescriptor createFunctionDescriptor() {
@@ -48,11 +65,8 @@
 
                     private ArrayBackedValueStorage outInput = new ArrayBackedValueStorage();
                     private ICopyEvaluator eval = args[0].createEvaluator(outInput);
-                    private int offset;
-                    private short hour, minute, second, msecond, timezoneHour, timezoneMinute, value;
-                    private byte timezonePart = 0;
                     private String errorMessage = "This can not be an instance of time";
-                    private AMutableTime aTime = new AMutableTime(0, 0, 0, 0, 0, 0);
+                    private AMutableTime aTime = new AMutableTime(0);
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ATime> timeSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ATIME);
@@ -68,75 +82,23 @@
                             eval.evaluate(tuple);
                             byte[] serString = outInput.getByteArray();
                             if (serString[0] == SER_STRING_TYPE_TAG) {
-                                offset = 3;
-                                if (serString[offset + 2] != ':' || serString[offset + 5] != ':')
-                                    throw new AlgebricksException(errorMessage);
+                                charAccessor.reset(serString, 3, 0);
+                                int chrononTimeInMs = ADateAndTimeParser.parseTimePart(charAccessor);
 
-                                hour = getValue(serString, offset, 2);
-                                minute = getValue(serString, offset + 3, 2);
-                                second = getValue(serString, offset + 6, 2);
-                                msecond = 0;
-
-                                if (serString[offset + 8] == ':') {
-                                    msecond = getValue(serString, offset + 9, 3);
-                                    if (hour < 0 || hour > 24 || minute < 0 || minute > 59 || second < 0 || second > 59
-                                            || msecond < 0 || msecond > 999
-                                            || (hour == 24 && (minute != 0 || second != 0 || msecond != 0)))
-                                        throw new AlgebricksException(errorMessage);
-                                    offset += 12;
-                                } else {
-                                    if (hour < 0 || hour > 24 || minute < 0 || minute > 59 || second < 0 || second > 59
-                                            || (hour == 24 && (minute != 0 || second != 0)))
-                                        throw new AlgebricksException(errorMessage);
-                                    offset += 8;
-                                }
-
-                                if (outInput.getLength() > offset) {
-                                    if (serString[offset] == 'Z')
-                                        timezonePart = 0;
-                                    else {
-                                        if ((serString[offset] != '+' && serString[offset] != '-')
-                                                || (serString[offset + 3] != ':'))
-                                            throw new AlgebricksException(errorMessage);
-
-                                        timezoneHour = getValue(serString, offset + 1, 2);
-                                        timezoneMinute = getValue(serString, offset + 4, 2);
-
-                                        if (timezoneHour < 0
-                                                || timezoneHour > 24
-                                                || (timezoneHour == 24 && timezoneMinute != 0)
-                                                || (timezoneMinute != 0 && timezoneMinute != 15 && timezoneMinute != 30 && timezoneMinute != 45))
-                                            throw new AlgebricksException(errorMessage);
-
-                                        if (serString[offset] == '-')
-                                            timezonePart = (byte) -((timezoneHour * 4) + timezoneMinute / 15);
-                                        else
-                                            timezonePart = (byte) ((timezoneHour * 4) + timezoneMinute / 15);
-                                    }
-                                }
-
-                                aTime.setValue(hour, minute, second, msecond, 0, timezonePart);
+                                aTime.setValue(chrononTimeInMs);
                                 timeSerde.serialize(aTime, out);
 
-                            } else if (serString[0] == SER_NULL_TYPE_TAG)
+                            } else if (serString[0] == SER_NULL_TYPE_TAG) {
                                 nullSerde.serialize(ANull.NULL, out);
-                            else
+                            } else {
                                 throw new AlgebricksException(errorMessage);
+                            }
                         } catch (IOException e1) {
                             throw new AlgebricksException(errorMessage);
+                        } catch (Exception e2) {
+                            throw new AlgebricksException(e2);
                         }
                     }
-
-                    private short getValue(byte[] b, int offset, int numberOfDigits) throws AlgebricksException {
-                        value = 0;
-                        for (int i = 0; i < numberOfDigits; i++) {
-                            if ((b[offset] >= '0' && b[offset] <= '9'))
-                                value = (short) (value * 10 + b[offset++] - '0');
-                            else
-                                throw new AlgebricksException(errorMessage);
-                        }
-                        return value;
-                    }
                 };
             }
         };
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/runningaggregates/base/AbstractRunningAggregateFunctionDynamicDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/runningaggregates/base/AbstractRunningAggregateFunctionDynamicDescriptor.java
index c8f12f0..9be4046 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/runningaggregates/base/AbstractRunningAggregateFunctionDynamicDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/runningaggregates/base/AbstractRunningAggregateFunctionDynamicDescriptor.java
@@ -1,10 +1,9 @@
 package edu.uci.ics.asterix.runtime.runningaggregates.base;
 
 import edu.uci.ics.asterix.common.functions.FunctionDescriptorTag;
-import edu.uci.ics.asterix.runtime.base.IRunningAggregateFunctionDynamicDescriptor;
+import edu.uci.ics.asterix.om.functions.AbstractFunctionDescriptor;
 
-public abstract class AbstractRunningAggregateFunctionDynamicDescriptor implements
-        IRunningAggregateFunctionDynamicDescriptor {
+public abstract class AbstractRunningAggregateFunctionDynamicDescriptor extends AbstractFunctionDescriptor {
     private static final long serialVersionUID = 1L;
 
     public FunctionDescriptorTag getFunctionDescriptorTag() {
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/unnestingfunctions/base/AbstractUnnestingFunctionDynamicDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/unnestingfunctions/base/AbstractUnnestingFunctionDynamicDescriptor.java
index 52a44ae..bcab30f 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/unnestingfunctions/base/AbstractUnnestingFunctionDynamicDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/unnestingfunctions/base/AbstractUnnestingFunctionDynamicDescriptor.java
@@ -1,9 +1,9 @@
 package edu.uci.ics.asterix.runtime.unnestingfunctions.base;
 
 import edu.uci.ics.asterix.common.functions.FunctionDescriptorTag;
-import edu.uci.ics.asterix.runtime.base.IUnnestingFunctionDynamicDescriptor;
+import edu.uci.ics.asterix.om.functions.AbstractFunctionDescriptor;
 
-public abstract class AbstractUnnestingFunctionDynamicDescriptor implements IUnnestingFunctionDynamicDescriptor {
+public abstract class AbstractUnnestingFunctionDynamicDescriptor extends AbstractFunctionDescriptor {
     private static final long serialVersionUID = 1L;
 
     public FunctionDescriptorTag getFunctionDescriptorTag() {
