[gnome-shell] shell: Remove format_date() utility function



commit f51952f5d6f8c31dd1a17ca68a8aad4a40099995
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Sep 10 05:12:14 2019 +0200

    shell: Remove format_date() utility function
    
    It is now unused.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/807

 src/shell-util.c | 35 -----------------------------------
 src/shell-util.h |  2 --
 2 files changed, 37 deletions(-)
---
diff --git a/src/shell-util.c b/src/shell-util.c
index c3ba57e296..f344ec50bb 100644
--- a/src/shell-util.c
+++ b/src/shell-util.c
@@ -128,41 +128,6 @@ shell_util_get_transformed_allocation (ClutterActor    *actor,
   box->y2 = y_max;
 }
 
-/**
- * shell_util_format_date:
- * @format: a strftime-style string format, as parsed by
- *   g_date_time_format()
- * @time_ms: milliseconds since 1970-01-01 00:00:00 UTC; the
- *   value returned by Date.getTime()
- *
- * Formats a date for the current locale. This should be
- * used instead of the Spidermonkey Date.toLocaleFormat()
- * extension because Date.toLocaleFormat() is buggy for
- * Unicode format strings:
- * https://bugzilla.mozilla.org/show_bug.cgi?id=508783
- *
- * Return value: the formatted date. If the date is
- *  outside of the range of a GDateTime (which contains
- *  any plausible dates we actually care about), will
- *  return an empty string.
- */
-char *
-shell_util_format_date (const char *format,
-                        gint64      time_ms)
-{
-  GDateTime *datetime;
-  char *result;
-
-  datetime = g_date_time_new_from_unix_local (time_ms / 1000);
-  if (!datetime) /* time_ms is out of range of GDateTime */
-    return g_strdup ("");
-
-  result = g_date_time_format (datetime, format);
-
-  g_date_time_unref (datetime);
-  return result;
-}
-
 /**
  * shell_util_get_week_start:
  *
diff --git a/src/shell-util.h b/src/shell-util.h
index 4453beb4a5..acd031048f 100644
--- a/src/shell-util.h
+++ b/src/shell-util.h
@@ -19,8 +19,6 @@ void     shell_util_get_transformed_allocation (ClutterActor     *actor,
 
 int      shell_util_get_week_start             (void);
 
-char    *shell_util_format_date                (const char       *format,
-                                                gint64            time_ms);
 const char *shell_util_translate_time_string   (const char *str);
 
 char    *shell_util_regex_escape               (const char *str);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]