diff --git a/common b/common
index 98e386f..03a0e57 160000
--- a/common
+++ b/common
@@ -1 +1 @@
-Subproject commit 98e386f58eb299db9228ba04b433526b0bc89311
+Subproject commit 03a0e5736761a72d4ed880e8c485bbf9e4a8ea47
diff --git a/gst/gstdatetime.c b/gst/gstdatetime.c
index ec98293..9dbd909 100644
--- a/gst/gstdatetime.c
+++ b/gst/gstdatetime.c
@@ -53,9 +53,23 @@ struct _GstDateTime
 {
   GDateTime *datetime;
 
+  guint8 partial_date;
   volatile gint ref_count;
 };
 
+guint8
+gst_date_time_get_partial_flags (const GstDateTime * datetime)
+{
+  return datetime->partial_date;
+}
+
+void
+gst_date_time_set_partial_flags (const GstDateTime * datetime,
+    guint8 partial_date)
+{
+  datetime->partial_date = partial_date;
+}
+
 static GstDateTime *
 gst_date_time_new_from_gdatetime (GDateTime * dt)
 {
@@ -267,10 +281,31 @@ GstDateTime *
 gst_date_time_new_local_time (gint year, gint month, gint day, gint hour,
     gint minute, gdouble seconds)
 {
+  g_return_val_if_fail (year > 0 && year <= 9999, NULL);
+  g_return_val_if_fail ((month > 0 && month <= 12), NULL);
+  g_return_val_if_fail ((day > 0 && day <= 31), NULL);
+  g_return_val_if_fail (hour >= 0 && hour < 24, NULL);
+  g_return_val_if_fail (minute >= 0 && minute < 60, NULL);
+  g_return_val_if_fail (seconds >= 0 && seconds < 60, NULL);
+
   return gst_date_time_new_from_gdatetime (g_date_time_new_local (year, month,
           day, hour, minute, seconds));
 }
 
+
+GstDateTime *
+gst_date_time_new_ymd (gint year, gint month, gint day)
+{
+  GstDateTime *datetime;
+  datetime = gst_date_time_new_local_time(year, month, day, 1, 1, 1);
+  gst_date_time_set_partial_flags(datetime,
+      GST_DATE_TIME_HAS_NO_HOUR |
+      GST_DATE_TIME_HAS_NO_MINUTE |
+      GST_DATE_TIME_HAS_NO_SECOND);
+  return datetime;
+}
+
+
 /**
  * gst_date_time_new_now_local_time:
  *
@@ -351,6 +386,14 @@ gst_date_time_new (gfloat tzoffset, gint year, gint month, gint day, gint hour,
   GDateTime *dt;
   gint tzhour, tzminute;
 
+  g_return_val_if_fail (year > 0 && year <= 9999, NULL);
+  g_return_val_if_fail ((month > 0 && month <= 12), NULL);
+  g_return_val_if_fail ((day > 0 && day <= 31), NULL);
+  g_return_val_if_fail (hour >= 0 && hour < 24, NULL);
+  g_return_val_if_fail (minute >= 0 && minute < 60, NULL);
+  g_return_val_if_fail (seconds >= 0 && seconds < 60, NULL);
+  g_return_val_if_fail (tzoffset >= -12.0 && tzoffset <= 12.0, NULL);
+
   tzhour = (gint) ABS (tzoffset);
   tzminute = (gint) ((ABS (tzoffset) - tzhour) * 60);
 
diff --git a/gst/gstdatetime.h b/gst/gstdatetime.h
index 96d8bbd..9a1a27e 100644
--- a/gst/gstdatetime.h
+++ b/gst/gstdatetime.h
@@ -36,6 +36,18 @@ G_BEGIN_DECLS
  */
 typedef struct _GstDateTime GstDateTime;
 
+/* GstDateTime->partial_date bits */
+#define GST_DATE_TIME_HAS_NO_YEAR              (1 << 0)
+#define GST_DATE_TIME_HAS_NO_MONTH             (1 << 1)
+#define GST_DATE_TIME_HAS_NO_DAY               (1 << 2)
+#define GST_DATE_TIME_HAS_NO_HOUR              (1 << 3)
+#define GST_DATE_TIME_HAS_NO_MINUTE            (1 << 4)
+#define GST_DATE_TIME_HAS_NO_SECOND            (1 << 5)
+
+guint8  gst_date_time_get_partial_flags    (const GstDateTime * datetime);
+void    gst_date_time_set_partial_flags    (const GstDateTime * datetime,
+                                            guint8 partial_date)
+
 gint    gst_date_time_get_year             (const GstDateTime * datetime);
 gint    gst_date_time_get_month            (const GstDateTime * datetime);
 gint    gst_date_time_get_day              (const GstDateTime * datetime);
@@ -51,6 +63,8 @@ GstDateTime *   gst_date_time_new_local_time            (gint year, gint month,
                                                          gint day, gint hour,
                                                          gint minute,
                                                          gdouble seconds) G_GNUC_MALLOC;
+GstDateTime *   gst_date_time_new_ymd                   (gint year, gint month,
+                                                         gint day) G_GNUC_MALLOC;
 GstDateTime *   gst_date_time_new                       (gfloat tzoffset,
                                                          gint year, gint month,
                                                          gint day, gint hour,
