Adding a common stringify_attributes function for dealing with attributes through out various helpers.

Signed-off-by: Eric Barnes <eric@ericlbarnes.com>
diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php
index a45b3d7..a792f09 100644
--- a/system/helpers/date_helper.php
+++ b/system/helpers/date_helper.php
@@ -575,22 +575,7 @@
 			$menu .= ' class="'.$class.'"';
 		}
 
-		// Generate a string from the attributes submitted, if any
-		if (is_array($attributes))
-		{
-			$atts = '';
-			foreach ($attributes as $key => $val)
-			{
-				$atts .= ' '.$key.'="'.$val.'"';
-			}
-			$attributes = $atts;
-		}
-		elseif (is_string($attributes) && strlen($attributes) > 0)
-		{
-			$attributes = ' '.$attributes;
-		}
-
-		$menu .= $attributes.">\n";
+		$menu .= _stringify_attributes($attributes).">\n";
 
 		foreach (timezones() as $key => $val)
 		{