diff --git a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangImport.java b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangImport.java
index b3f0e2b..d4b3d1a 100644
--- a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangImport.java
+++ b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangImport.java
@@ -21,7 +21,7 @@
 import org.slf4j.Logger;
 
 import java.io.Serializable;
-import java.util.Date;
+import java.time.LocalDate;
 import java.util.Set;
 
 import static org.onosproject.yang.compiler.datamodel.utils.DataModelUtils.findReferredNode;
@@ -96,7 +96,7 @@
      * the most recent "revision" statement in the imported module. organization
      * which defined the YANG module.
      */
-    private Date revision;
+    private LocalDate revision;
 
     /**
      * Reference to node which is imported.
@@ -151,7 +151,7 @@
      *
      * @return the revision of the imported module
      */
-    public Date getRevision() {
+    public LocalDate getRevision() {
         return revision;
     }
 
@@ -160,7 +160,7 @@
      *
      * @param rev set the revision of the imported module
      */
-    public void setRevision(Date rev) {
+    public void setRevision(LocalDate rev) {
         revision = rev;
     }
 
@@ -224,7 +224,7 @@
      */
     public void addReferenceToImport(Set<YangNode> yangNodeSet) throws DataModelException {
         String importedModuleName = getModuleName();
-        Date importedModuleRevision = getRevision();
+        LocalDate importedModuleRevision = getRevision();
         YangNode moduleNode = null;
         /*
          * Find the imported module node for a given module name with a
diff --git a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangInclude.java b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangInclude.java
index 873ec6e..2d520d3 100644
--- a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangInclude.java
+++ b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangInclude.java
@@ -20,7 +20,7 @@
 import org.onosproject.yang.compiler.datamodel.utils.YangConstructType;
 
 import java.io.Serializable;
-import java.util.Date;
+import java.time.LocalDate;
 import java.util.Set;
 
 import static org.onosproject.yang.compiler.datamodel.utils.DataModelUtils.findReferredNode;
@@ -57,7 +57,7 @@
      * The include's "revision-date" statement is used to specify the exact
      * version of the submodule to import.
      */
-    private Date revision;
+    private LocalDate revision;
 
     /**
      * Reference to node which is included.
@@ -93,7 +93,7 @@
      *
      * @return the revision
      */
-    public Date getRevision() {
+    public LocalDate getRevision() {
         return revision;
     }
 
@@ -102,7 +102,7 @@
      *
      * @param revision the revision to set
      */
-    public void setRevision(Date revision) {
+    public void setRevision(LocalDate revision) {
         this.revision = revision;
     }
 
@@ -157,7 +157,7 @@
      */
     public YangSubModule addReferenceToInclude(Set<YangNode> yangNodeSet) throws DataModelException {
         String includedSubModuleName = getSubModuleName();
-        Date includedSubModuleRevision = getRevision();
+        LocalDate includedSubModuleRevision = getRevision();
         YangNode subModuleNode = null;
 
         /*
diff --git a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangRevision.java b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangRevision.java
index 6d4a52b..fdafdb4 100644
--- a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangRevision.java
+++ b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/YangRevision.java
@@ -20,7 +20,7 @@
 import org.onosproject.yang.compiler.datamodel.utils.YangConstructType;
 
 import java.io.Serializable;
-import java.util.Date;
+import java.time.LocalDate;
 
 /*
  *  Reference:RFC 6020.
@@ -55,7 +55,7 @@
     /**
      * Revision date. Date string in the format "YYYY-MM-DD"
      */
-    private Date revDate;
+    private LocalDate revDate;
 
     /**
      * Description of revision.
@@ -78,7 +78,7 @@
      *
      * @return the revision date
      */
-    public Date getRevDate() {
+    public LocalDate getRevDate() {
         return revDate;
     }
 
@@ -87,7 +87,7 @@
      *
      * @param revDate the revision date to set
      */
-    public void setRevDate(Date revDate) {
+    public void setRevDate(LocalDate revDate) {
         this.revDate = revDate;
     }
 
diff --git a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/utils/DataModelUtils.java b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/utils/DataModelUtils.java
index 9a9cde1..b3b60a4 100644
--- a/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/utils/DataModelUtils.java
+++ b/compiler/base/datamodel/src/main/java/org/onosproject/yang/compiler/datamodel/utils/DataModelUtils.java
@@ -76,7 +76,6 @@
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
-import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Enumeration;
@@ -1476,8 +1475,7 @@
     public static String getDateInStringFormat(YangNode schemaNode) {
         if (schemaNode != null) {
             if (schemaNode.getRevision() != null) {
-                return new SimpleDateFormat(DATE_FORMAT)
-                        .format(schemaNode.getRevision().getRevDate());
+                return schemaNode.getRevision().getRevDate().toString();
             }
         }
         return null;
diff --git a/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/listeners/RevisionDateListener.java b/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/listeners/RevisionDateListener.java
index e51c33b..b299b66 100644
--- a/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/listeners/RevisionDateListener.java
+++ b/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/listeners/RevisionDateListener.java
@@ -22,7 +22,7 @@
 import org.onosproject.yang.compiler.parser.exceptions.ParserException;
 import org.onosproject.yang.compiler.parser.impl.TreeWalkListener;
 
-import java.util.Date;
+import java.time.LocalDate;
 
 import static org.onosproject.yang.compiler.datamodel.utils.YangConstructType.REVISION_DATE_DATA;
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.RevisionDateStatementContext;
@@ -88,7 +88,7 @@
         checkStackIsNotEmpty(listener, MISSING_HOLDER, REVISION_DATE_DATA, ctx.dateArgumentString().getText(),
                 ENTRY);
 
-        Date date = getValidDateFromString(ctx.dateArgumentString().getText(), ctx);
+        LocalDate date = getValidDateFromString(ctx.dateArgumentString().getText(), ctx);
 
         // Obtain the node of the stack.
         Parsable tmpNode = listener.getParsedDataStack().peek();
diff --git a/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/listeners/RevisionListener.java b/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/listeners/RevisionListener.java
index 5868328..f3ba93d 100644
--- a/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/listeners/RevisionListener.java
+++ b/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/listeners/RevisionListener.java
@@ -23,7 +23,7 @@
 import org.onosproject.yang.compiler.parser.exceptions.ParserException;
 import org.onosproject.yang.compiler.parser.impl.TreeWalkListener;
 
-import java.util.Date;
+import java.time.LocalDate;
 
 import static org.onosproject.yang.compiler.datamodel.utils.YangConstructType.REVISION_DATA;
 import static org.onosproject.yang.compiler.parser.antlrgencode.GeneratedYangParser.RevisionStatementContext;
@@ -89,7 +89,7 @@
         // Check for stack to be non empty.
         checkStackIsNotEmpty(listener, MISSING_HOLDER, REVISION_DATA, ctx.dateArgumentString().getText(), ENTRY);
 
-        Date date = getValidDateFromString(ctx.dateArgumentString().getText(), ctx);
+        LocalDate date = getValidDateFromString(ctx.dateArgumentString().getText(), ctx);
 
         YangRevision revisionNode = new YangRevision();
         revisionNode.setRevDate(date);
@@ -123,8 +123,8 @@
                 case MODULE_DATA: {
                     YangModule module = (YangModule) tmpNode;
                     if (module.getRevision() != null) {
-                        Date curRevisionDate = module.getRevision().getRevDate();
-                        if (curRevisionDate.before(((YangRevision) tmpRevisionNode).getRevDate())) {
+                        LocalDate curRevisionDate = module.getRevision().getRevDate();
+                        if (curRevisionDate.isBefore(((YangRevision) tmpRevisionNode).getRevDate())) {
                             module.setRevision((YangRevision) tmpRevisionNode);
                         }
                     } else {
@@ -135,8 +135,8 @@
                 case SUB_MODULE_DATA: {
                     YangSubModule subModule = (YangSubModule) tmpNode;
                     if (subModule.getRevision() != null) {
-                        Date curRevisionDate = subModule.getRevision().getRevDate();
-                        if (curRevisionDate.before(((YangRevision) tmpRevisionNode).getRevDate())) {
+                        LocalDate curRevisionDate = subModule.getRevision().getRevDate();
+                        if (curRevisionDate.isBefore(((YangRevision) tmpRevisionNode).getRevDate())) {
                             subModule.setRevision((YangRevision) tmpRevisionNode);
                         }
                     } else {
diff --git a/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/parserutils/ListenerUtil.java b/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/parserutils/ListenerUtil.java
index 538e863..7d8c5a1 100644
--- a/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/parserutils/ListenerUtil.java
+++ b/compiler/base/parser/src/main/java/org/onosproject/yang/compiler/parser/impl/parserutils/ListenerUtil.java
@@ -39,10 +39,8 @@
 import org.onosproject.yang.compiler.translator.tojava.javamodel.YangJavaAugmentTranslator;
 import org.slf4j.Logger;
 
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
+import java.time.LocalDate;
 import java.util.ArrayList;
-import java.util.Date;
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
@@ -70,6 +68,7 @@
 import static org.onosproject.yang.compiler.utils.UtilConstants.CURRENT;
 import static org.onosproject.yang.compiler.utils.UtilConstants.EMPTY_STRING;
 import static org.onosproject.yang.compiler.utils.UtilConstants.FALSE;
+import static org.onosproject.yang.compiler.utils.UtilConstants.HYPHEN;
 import static org.onosproject.yang.compiler.utils.UtilConstants.IN;
 import static org.onosproject.yang.compiler.utils.UtilConstants.INVALID_TREE;
 import static org.onosproject.yang.compiler.utils.UtilConstants.ONE;
@@ -103,6 +102,8 @@
             Pattern.compile("\\[(.*?)\\]");
     private static final String XML = "xml";
     private static final int IDENTIFIER_LENGTH = 64;
+    private static final int VALUE_CHECK = 10;
+    private static final int ZERO = 0;
     private static final String DATE_FORMAT = "yyyy-MM-dd";
     private static final String REGEX_EQUAL = "[=]";
     private static final String REGEX_OPEN_BRACE = "[(]";
@@ -173,30 +174,6 @@
     }
 
     /**
-     * Validates the revision date.
-     *
-     * @param dateToValidate input revision date
-     * @return validation result, true for success, false for failure
-     */
-    public static boolean isDateValid(String dateToValidate) {
-        if (dateToValidate == null || !dateToValidate.matches(DATE_PATTERN)) {
-            return false;
-        }
-
-        SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
-        sdf.setLenient(false);
-
-        try {
-            //if not valid, it will throw ParseException
-            sdf.parse(dateToValidate);
-        } catch (ParseException e) {
-            return false;
-        }
-
-        return true;
-    }
-
-    /**
      * Validates YANG version.
      *
      * @param ctx version context object of the grammar rule
@@ -311,27 +288,6 @@
     }
 
     /**
-     * Returns current date and makes it in usable format for revision.
-     *
-     * @return usable current date format for revision
-     */
-    public static Date getCurrentDateForRevision() {
-
-        SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT);
-
-        Date date = new Date();
-        String dateInString = dateFormat.format(date);
-        try {
-            //if not valid, it will throw ParseException
-            Date now = dateFormat.parse(dateInString);
-            return date;
-        } catch (ParseException e) {
-            ParserException parserException = new ParserException("YANG file error: Input date is not correct");
-            throw parserException;
-        }
-    }
-
-    /**
      * Checks and return valid node identifier.
      *
      * @param nodeIdentifierString string from yang file
@@ -630,7 +586,7 @@
      * @param ctx          yang construct's context to get the line number and character position
      * @return date format for revision
      */
-    public static Date getValidDateFromString(String dateInString, ParserRuleContext ctx) {
+    public static LocalDate getValidDateFromString(String dateInString, ParserRuleContext ctx) {
         String dateArgument = removeQuotesAndHandleConcat(dateInString);
         if (!dateArgument.matches(DATE_PATTERN)) {
             ParserException parserException = new ParserException("YANG file error: Input date is not correct");
@@ -639,18 +595,20 @@
             throw parserException;
         }
 
-        SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
-        sdf.setLenient(false);
+        String[] revisionArr = dateArgument.toString().split(HYPHEN);
 
-        try {
-            //if not valid, it will throw ParseException
-            return sdf.parse(dateArgument);
-        } catch (ParseException e) {
-            ParserException parserException = new ParserException("YANG file error: Input date is not correct");
-            parserException.setLine(ctx.getStart().getLine());
-            parserException.setCharPosition(ctx.getStart().getCharPositionInLine());
-            throw parserException;
+        StringBuilder rev = new StringBuilder(revisionArr[0]);
+        for (int i = 1; i < revisionArr.length; i++) {
+            rev.append(HYPHEN);
+            Integer val = Integer.parseInt(revisionArr[i]);
+            if (val < VALUE_CHECK) {
+                rev.append(ZERO);
+            }
+            rev.append(val);
         }
+
+        //if not valid, it will throw ParseException
+        return LocalDate.parse(rev);
     }
 
     /**
diff --git a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/ImportListenerTest.java b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/ImportListenerTest.java
index 31ba584..b47c957 100644
--- a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/ImportListenerTest.java
+++ b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/ImportListenerTest.java
@@ -24,7 +24,7 @@
 
 import java.io.IOException;
 import java.text.ParseException;
-import java.text.SimpleDateFormat;
+import java.time.LocalDate;
 
 import static org.hamcrest.core.Is.is;
 import static org.junit.Assert.assertThat;
@@ -35,8 +35,6 @@
 public class ImportListenerTest {
 
     private final YangUtilsParserManager manager = new YangUtilsParserManager();
-    private static final String DATE_FORMAT = "yyyy-MM-dd";
-    private final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(DATE_FORMAT);
 
     /**
      * Checks if mandatory parameter prefix is present in import.
@@ -74,7 +72,7 @@
         YangNode node = manager.getDataModel("src/test/resources/ImportValidEntry.yang");
 
         // Checks for the revision value in data model tree.
-        assertThat(((YangModule) node).getImportList().get(0).getRevision(), is(simpleDateFormat.parse("2015-02-03")));
+        assertThat(((YangModule) node).getImportList().get(0).getRevision(), is(LocalDate.parse("2015-02-03")));
         // Checks for the prefix id in data model tree.
         assertThat(((YangModule) node).getImportList().get(0).getPrefixId(), is("On2"));
         // Checks for the module name in data model tree.
diff --git a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/IncludeListenerTest.java b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/IncludeListenerTest.java
index db549de..c25d02f 100644
--- a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/IncludeListenerTest.java
+++ b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/IncludeListenerTest.java
@@ -24,7 +24,7 @@
 
 import java.io.IOException;
 import java.text.ParseException;
-import java.text.SimpleDateFormat;
+import java.time.LocalDate;
 
 import static org.hamcrest.core.Is.is;
 import static org.junit.Assert.assertThat;
@@ -35,8 +35,6 @@
 public class IncludeListenerTest {
 
     private final YangUtilsParserManager manager = new YangUtilsParserManager();
-    private static final String DATE_FORMAT = "yyyy-MM-dd";
-    private final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(DATE_FORMAT);
 
     /**
      * Checks if include listener with ; is valid and updates the data
@@ -75,7 +73,7 @@
 
         // Checks for the sub module name in data model tree.
         assertThat(((YangModule) node).getIncludeList().get(0).getSubModuleName(), is("itut"));
-        assertThat(((YangModule) node).getIncludeList().get(0).getRevision(), is(simpleDateFormat.parse("2016-02-03")));
+        assertThat(((YangModule) node).getIncludeList().get(0).getRevision(), is(LocalDate.parse("2016-02-03")));
     }
 
     /**
@@ -88,9 +86,9 @@
 
         // Checks for the sub module name in data model tree.
         assertThat(((YangModule) node).getIncludeList().get(0).getSubModuleName(), is("itut"));
-        assertThat(((YangModule) node).getIncludeList().get(0).getRevision(), is(simpleDateFormat.parse("2016-02-03")));
+        assertThat(((YangModule) node).getIncludeList().get(0).getRevision(), is(LocalDate.parse("2016-02-03")));
         assertThat(((YangModule) node).getIncludeList().get(1).getSubModuleName(), is("sdn"));
-        assertThat(((YangModule) node).getIncludeList().get(1).getRevision(), is(simpleDateFormat.parse("2014-02-03")));
+        assertThat(((YangModule) node).getIncludeList().get(1).getRevision(), is(LocalDate.parse("2014-02-03")));
     }
 
     /**
@@ -103,9 +101,9 @@
 
         // Checks for the sub module name in data model tree.
         assertThat(((YangModule) node).getIncludeList().get(0).getSubModuleName(), is("itut"));
-        assertThat(((YangModule) node).getIncludeList().get(0).getRevision(), is(simpleDateFormat.parse("2016-02-03")));
+        assertThat(((YangModule) node).getIncludeList().get(0).getRevision(), is(LocalDate.parse("2016-02-03")));
         assertThat(((YangModule) node).getIncludeList().get(1).getSubModuleName(), is("sdn"));
-        assertThat(((YangModule) node).getIncludeList().get(1).getRevision(), is(simpleDateFormat.parse("2014-02-03")));
+        assertThat(((YangModule) node).getIncludeList().get(1).getRevision(), is(LocalDate.parse("2014-02-03")));
     }
 
     /**
diff --git a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/RevisionDateListenerTest.java b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/RevisionDateListenerTest.java
index 7f088e8..27ffe05 100644
--- a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/RevisionDateListenerTest.java
+++ b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/RevisionDateListenerTest.java
@@ -24,7 +24,8 @@
 
 import java.io.IOException;
 import java.text.ParseException;
-import java.text.SimpleDateFormat;
+import java.time.LocalDate;
+import java.time.format.DateTimeParseException;
 
 import static org.hamcrest.core.Is.is;
 import static org.junit.Assert.assertThat;
@@ -35,8 +36,6 @@
 public class RevisionDateListenerTest {
 
     private final YangUtilsParserManager manager = new YangUtilsParserManager();
-    private static final String DATE_FORMAT = "yyyy-MM-dd";
-    private final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(DATE_FORMAT);
 
     /**
      * Checks if revision date syntax is correct in include.
@@ -64,9 +63,9 @@
 
         YangNode node = manager.getDataModel("src/test/resources/RevisionDateInQuotesAtInclude.yang");
         // Checks for the version value in data model tree.
-        assertThat(((YangModule) node).getImportList().get(0).getRevision(), is(simpleDateFormat.parse("2015-02-03")));
-        assertThat(((YangModule) node).getIncludeList().get(0).getRevision(), is(simpleDateFormat.parse("2016-02-03")));
-        assertThat(((YangModule) node).getIncludeList().get(1).getRevision(), is(simpleDateFormat.parse("2014-02-03")));
+        assertThat(((YangModule) node).getImportList().get(0).getRevision(), is(LocalDate.parse("2015-02-03")));
+        assertThat(((YangModule) node).getIncludeList().get(0).getRevision(), is(LocalDate.parse("2016-02-03")));
+        assertThat(((YangModule) node).getIncludeList().get(1).getRevision(), is(LocalDate.parse("2014-02-03")));
     }
 
     /**
@@ -77,9 +76,9 @@
 
         YangNode node = manager.getDataModel("src/test/resources/RevisionDateInQuotesAtImport.yang");
         // Checks for the version value in data model tree.
-        assertThat(((YangModule) node).getImportList().get(0).getRevision(), is(simpleDateFormat.parse("2015-02-03")));
-        assertThat(((YangModule) node).getIncludeList().get(0).getRevision(), is(simpleDateFormat.parse("2016-02-03")));
-        assertThat(((YangModule) node).getIncludeList().get(1).getRevision(), is(simpleDateFormat.parse("2014-02-03")));
+        assertThat(((YangModule) node).getImportList().get(0).getRevision(), is(LocalDate.parse("2015-02-03")));
+        assertThat(((YangModule) node).getIncludeList().get(0).getRevision(), is(LocalDate.parse("2016-02-03")));
+        assertThat(((YangModule) node).getIncludeList().get(1).getRevision(), is(LocalDate.parse("2014-02-03")));
     }
 
     /**
@@ -94,7 +93,7 @@
     /**
      * Checks if revision date is correct.
      */
-    @Test(expected = ParserException.class)
+    @Test(expected = DateTimeParseException.class)
     public void processRevisionDateInvalid() throws IOException, ParserException {
 
         YangNode node = manager.getDataModel("src/test/resources/RevisionDateInvalid.yang");
@@ -109,8 +108,8 @@
         YangNode node = manager.getDataModel("src/test/resources/RevisionDateValidEntry.yang");
 
         // Checks for the version value in data model tree.
-        assertThat(((YangModule) node).getImportList().get(0).getRevision(), is(simpleDateFormat.parse("2015-02-03")));
-        assertThat(((YangModule) node).getIncludeList().get(0).getRevision(), is(simpleDateFormat.parse("2016-02-03")));
-        assertThat(((YangModule) node).getIncludeList().get(1).getRevision(), is(simpleDateFormat.parse("2014-02-03")));
+        assertThat(((YangModule) node).getImportList().get(0).getRevision(), is(LocalDate.parse("2015-02-03")));
+        assertThat(((YangModule) node).getIncludeList().get(0).getRevision(), is(LocalDate.parse("2016-02-03")));
+        assertThat(((YangModule) node).getIncludeList().get(1).getRevision(), is(LocalDate.parse("2014-02-03")));
     }
 }
\ No newline at end of file
diff --git a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/RevisionListenerTest.java b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/RevisionListenerTest.java
index 8c7a816..0ce6886 100644
--- a/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/RevisionListenerTest.java
+++ b/compiler/base/parser/src/test/java/org/onosproject/yang/compiler/parser/impl/listeners/RevisionListenerTest.java
@@ -24,7 +24,7 @@
 
 import java.io.IOException;
 import java.text.ParseException;
-import java.text.SimpleDateFormat;
+import java.time.LocalDate;
 
 import static org.hamcrest.core.Is.is;
 import static org.junit.Assert.assertThat;
@@ -35,8 +35,6 @@
 public class RevisionListenerTest {
 
     private final YangUtilsParserManager manager = new YangUtilsParserManager();
-    private static final String DATE_FORMAT = "yyyy-MM-dd";
-    private final SimpleDateFormat simpleDateFormat = new SimpleDateFormat(DATE_FORMAT);
 
     /**
      * Checks if revision doesn't have optional parameters "revision and
@@ -47,7 +45,7 @@
 
         YangNode node = manager.getDataModel("src/test/resources/RevisionNoOptionalParameter.yang");
         // Checks for the version value in data model tree.
-        assertThat(((YangModule) node).getRevision().getRevDate(), is(simpleDateFormat.parse("2016-02-03")));
+        assertThat(((YangModule) node).getRevision().getRevDate(), is(LocalDate.parse("2016-02-03")));
     }
 
     /**
@@ -85,6 +83,33 @@
     public void processWithMultipleRevision() throws IOException, ParserException, ParseException {
 
         YangNode node = manager.getDataModel("src/test/resources/MultipleRevision.yang");
-        assertThat((node).getRevision().getRevDate(), is(simpleDateFormat.parse("2013-07-15")));
+        assertThat((node).getRevision().getRevDate(), is(LocalDate.parse("2013-07-15")));
+    }
+
+    /**
+     * Checks revision month of date in single digit format.
+     */
+    @Test
+    public void processRevisionDateWithSingleDigitMonth() throws IOException, ParserException, ParseException {
+        YangNode node = manager.getDataModel("src/test/resources/RevisionMonthSingleDigit.yang");
+        assertThat((node).getRevision().getRevDate(), is(LocalDate.parse("2013-07-15")));
+    }
+
+    /**
+     * Checks revision day in single digit format.
+     */
+    @Test
+    public void processRevisionDateWithSingleDigitDay() throws IOException, ParserException, ParseException {
+        YangNode node = manager.getDataModel("src/test/resources/RevisionDaySingleDigit.yang");
+        assertThat((node).getRevision().getRevDate(), is(LocalDate.parse("2013-10-07")));
+    }
+
+    /**
+     * Checks revision day and month in single digit format.
+     */
+    @Test
+    public void processRevisionDateWithSingleDigitDayMonth() throws IOException, ParserException, ParseException {
+        YangNode node = manager.getDataModel("src/test/resources/RevisionDayMonthSingleDigit.yang");
+        assertThat((node).getRevision().getRevDate(), is(LocalDate.parse("2013-07-07")));
     }
 }
\ No newline at end of file
diff --git a/compiler/base/parser/src/test/resources/RevisionDayMonthSingleDigit.yang b/compiler/base/parser/src/test/resources/RevisionDayMonthSingleDigit.yang
new file mode 100755
index 0000000..96686cb
--- /dev/null
+++ b/compiler/base/parser/src/test/resources/RevisionDayMonthSingleDigit.yang
@@ -0,0 +1,17 @@
+module Test {
+    yang-version 1;
+    namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+    prefix test;
+
+     revision 2013-7-7 {
+       description
+        "This revision adds the following new data types:
+         - yang-identifier
+         - hex-string
+         - uuid
+         - dotted-quad";
+       reference
+        "RFC 6991: Common YANG Data Types";
+     }
+
+}
diff --git a/compiler/base/parser/src/test/resources/RevisionDaySingleDigit.yang b/compiler/base/parser/src/test/resources/RevisionDaySingleDigit.yang
new file mode 100755
index 0000000..0c60001
--- /dev/null
+++ b/compiler/base/parser/src/test/resources/RevisionDaySingleDigit.yang
@@ -0,0 +1,17 @@
+module Test {
+    yang-version 1;
+    namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+    prefix test;
+
+     revision 2013-10-7 {
+       description
+        "This revision adds the following new data types:
+         - yang-identifier
+         - hex-string
+         - uuid
+         - dotted-quad";
+       reference
+        "RFC 6991: Common YANG Data Types";
+     }
+
+}
diff --git a/compiler/base/parser/src/test/resources/RevisionMonthSingleDigit.yang b/compiler/base/parser/src/test/resources/RevisionMonthSingleDigit.yang
new file mode 100755
index 0000000..6e75f73
--- /dev/null
+++ b/compiler/base/parser/src/test/resources/RevisionMonthSingleDigit.yang
@@ -0,0 +1,17 @@
+module Test {
+    yang-version 1;
+    namespace urn:ietf:params:xml:ns:yang:ietf-ospf;
+    prefix test;
+
+     revision 2013-7-15 {
+       description
+        "This revision adds the following new data types:
+         - yang-identifier
+         - hex-string
+         - uuid
+         - dotted-quad";
+       reference
+        "RFC 6991: Common YANG Data Types";
+     }
+
+}
diff --git a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaIdentifierSyntax.java b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaIdentifierSyntax.java
index 9e14b5b..b9f7d46 100644
--- a/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaIdentifierSyntax.java
+++ b/compiler/base/translator/src/main/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaIdentifierSyntax.java
@@ -25,10 +25,9 @@
 
 import java.io.File;
 import java.io.IOException;
-import java.text.SimpleDateFormat;
+import java.time.LocalDate;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Date;
 import java.util.List;
 
 import static org.onosproject.yang.compiler.datamodel.utils.DataModelUtils.getParentNodeInGenCode;
@@ -111,10 +110,8 @@
      * @param date YANG module revision
      * @return revision string
      */
-    private static String getYangRevisionStr(Date date) {
-        SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);
-        String dateInString = sdf.format(date);
-        String[] revisionArr = dateInString.split(HYPHEN);
+    private static String getYangRevisionStr(LocalDate date) {
+        String[] revisionArr = date.toString().split(HYPHEN);
 
         StringBuilder rev = new StringBuilder(REVISION_PREFIX)
                 .append(revisionArr[INDEX_ZERO]);
diff --git a/compiler/base/translator/src/test/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaIdentifierSyntaxTest.java b/compiler/base/translator/src/test/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaIdentifierSyntaxTest.java
index 6ef2d3a..0d37798 100644
--- a/compiler/base/translator/src/test/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaIdentifierSyntaxTest.java
+++ b/compiler/base/translator/src/test/java/org/onosproject/yang/compiler/translator/tojava/utils/JavaIdentifierSyntaxTest.java
@@ -31,7 +31,7 @@
 import java.lang.reflect.InvocationTargetException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.util.Date;
+import java.time.LocalDate;
 
 import static org.apache.commons.io.FileUtils.deleteDirectory;
 import static org.hamcrest.core.Is.is;
@@ -52,7 +52,7 @@
 
     private static final String PARENT_PACKAGE = "test5/test6/test7";
     private static final String CHILD_PACKAGE = "test1-test2-test3";
-    private static final String DATE1 = "2000-1-5";
+    private static final String DATE1 = "2000-01-05";
     private static final String DATE2 = "1992-01-25";
     private static final String PARENT_WITH_PERIOD = "test5.test6.test7";
     private static final String CHILD_WITH_PERIOD = "test1test2test3";
@@ -174,7 +174,6 @@
     @Test
     public void getRootPackageWithRevTest()
             throws ParseException {
-        Date date = simpleDateFormat.parse(DATE2);
         String rootPkgWithRev = getRootPackage("1", CHILD_PACKAGE,
                                                getYangRevision(DATE2), null);
         assertThat(rootPkgWithRev.equals(
@@ -306,11 +305,7 @@
 
     private YangRevision getYangRevision(String date) {
         YangRevision revision = new YangRevision();
-        try {
-            revision.setRevDate(simpleDateFormat.parse(date));
-        } catch (ParseException e) {
-            e.printStackTrace();
-        }
+        revision.setRevDate(LocalDate.parse(date));
         return revision;
     }
 }
