dm: rtc: Rename gregorian day function

Change this function name to something more descriptive. Also return a
failure code if it cannot calculate a correct value.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
diff --git a/common/cmd_date.c b/common/cmd_date.c
index 4a653e5..dfb9349 100644
--- a/common/cmd_date.c
+++ b/common/cmd_date.c
@@ -201,7 +201,7 @@
 		tmp->tm_min  = val;
 
 		/* calculate day of week */
-		GregorianDay (tmp);
+		rtc_calc_weekday(tmp);
 
 		return (0);
 	default: