*
* Return a select using 'field_select_raw' template, with timezones
* groupped (primarily) by continent
-.* arguments follow convetion as other field_* template array:
-.* 'name', 'label', $value, 'help'
+ * arguments follow convetion as other field_* template array:
+ * 'name', 'label', $value, 'help'
*
* @param string $name Name of the selector
* @param string $label Label for the selector
* @param string $fmt Output format recognised from php's DateTime class
* http://www.php.net/manual/en/datetime.format.php
*
- * @return string
+ * @return string Formatted date according to given format
*/
function datetime_convert($from = 'UTC', $to = 'UTC', $s = 'now', $fmt = "Y-m-d H:i:s") {
}
$d->setTimeZone($to_obj);
+
return($d->format($fmt));
}
* @param string $owner_tz (optional) Timezone of the person of interest
* @param string $viewer_tz (optional) Timezone of the person viewing
*
- * @return int
+ * @return int Age in years
*/
function age($dob,$owner_tz = '',$viewer_tz = '') {
if(! intval($dob))