+        DateFormat df = DateFormat.getDateTimeInstance();\r
+        return df.format(date);\r
+    }\r
+    \r
+    \r
+    public static int getSeasonalIconId() {\r
+        if (Calendar.getInstance().get(Calendar.DAY_OF_YEAR) >= 354 &&\r
+                MainApp.getAppContext().getString(R.string.app_name).equals(OWNCLOUD_APP_NAME)) {\r
+            return R.drawable.winter_holidays_icon;\r
+        } else {\r
+            return R.drawable.icon;\r
+        }\r
+    }\r
+    \r
+    /**\r
+     * Converts an internationalized domain name (IDN) in an URL to and from ASCII/Unicode.\r
+     * @param url the URL where the domain name should be converted\r
+     * @param toASCII if true converts from Unicode to ASCII, if false converts from ASCII to Unicode\r
+     * @return the URL containing the converted domain name\r
+     */\r
+    @TargetApi(Build.VERSION_CODES.GINGERBREAD)\r
+    public static String convertIdn(String url, boolean toASCII) {\r
+\r
+        String urlNoDots = url;\r
+        String dots="";\r
+        while (urlNoDots.startsWith(".")) {\r
+            urlNoDots = url.substring(1);\r
+            dots = dots + ".";\r
+        }\r
+\r
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {\r
+            // Find host name after '//' or '@'\r
+            int hostStart = 0;\r
+            if  (urlNoDots.indexOf("//") != -1) {\r
+                hostStart = url.indexOf("//") + "//".length();\r
+            } else if (url.indexOf("@") != -1) {\r
+                hostStart = url.indexOf("@") + "@".length();\r
+            }\r
+\r
+            int hostEnd = url.substring(hostStart).indexOf("/");\r
+            // Handle URL which doesn't have a path (path is implicitly '/')\r
+            hostEnd = (hostEnd == -1 ? urlNoDots.length() : hostStart + hostEnd);\r
+\r
+            String host = urlNoDots.substring(hostStart, hostEnd);\r
+            host = (toASCII ? IDN.toASCII(host) : IDN.toUnicode(host));\r
+\r
+            return dots + urlNoDots.substring(0, hostStart) + host + urlNoDots.substring(hostEnd);\r
+        } else {\r
+            return dots + url;\r
+        }\r
+    }\r
+\r
+    /**\r
+     * Get the file extension if it is on path as type "content://.../DocInfo.doc"\r
+     * @param filepath: Content Uri converted to string format\r
+     * @return String: fileExtension (type '.pdf'). Empty if no extension\r
+     */\r
+    public static String getComposedFileExtension(String filepath) {\r
+        String fileExtension = "";\r
+        String fileNameInContentUri = filepath.substring(filepath.lastIndexOf("/"));\r
+\r
+        // Check if extension is included in uri\r
+        int pos = fileNameInContentUri.lastIndexOf('.');\r
+        if (pos >= 0) {\r
+            fileExtension = fileNameInContentUri.substring(pos);\r
+        }\r
+        return fileExtension;\r