Add parseDate function

Native pipeline scripts requires approve to use Date.parse method,
so to avoid this create a new function.

Change-Id: I8f167c01162abec22c2e1356fad17f83aac703c0
Related-Prod: PROD-27169 (PROD:27169)
diff --git a/src/com/mirantis/mk/Common.groovy b/src/com/mirantis/mk/Common.groovy
index aa9b487..1d4a29d 100644
--- a/src/com/mirantis/mk/Common.groovy
+++ b/src/com/mirantis/mk/Common.groovy
@@ -989,3 +989,14 @@
         sh('cat /etc/apt/apt.conf.d/99setupAndTestNode')
     }
 }
+
+/**
+ * Parse date from string
+ * @param String date - date to parse
+ * @param String format - date format in provided date string value
+ *
+ * return new Date() object
+ */
+Date parseDate(String date, String format) {
+    return Date.parse(format, date)
+}