The Red Matrix
 All Classes Namespaces Files Functions Variables Pages
datetime.php File Reference

Functions

 timezone_cmp ($a, $b)
 
 select_timezone ($current= 'America/Los_Angeles')
 
 field_timezone ($name='timezone', $label='', $current= 'America/Los_Angeles', $help)
 
 datetime_convert ($from= 'UTC', $to= 'UTC', $s= 'now', $fmt="Y-m-d H:i:s")
 
 dob ($dob)
 
 datesel_format ($f)
 
 datesel ($f, $pre, $ymin, $ymax, $allow_blank, $y, $m, $d)
 
 timesel ($pre, $h, $m)
 
 relative_date ($posted_date, $format=null)
 
 age ($dob, $owner_tz= '', $viewer_tz= '')
 
 get_dim ($y, $m)
 
 get_first_dim ($y, $m)
 
 cal ($y=0, $m=0, $links=false, $class='')
 
 z_birthday ($dob, $tz, $format="Y-m-d H:i:s")
 
 update_birthdays ()
 

Function Documentation

age (   $dob,
  $owner_tz = '',
  $viewer_tz = '' 
)
cal (   $y = 0,
  $m = 0,
  $links = false,
  $class = '' 
)

Referenced by events_content().

datesel (   $f,
  $pre,
  $ymin,
  $ymax,
  $allow_blank,
  $y,
  $m,
  $d 
)

Referenced by dob(), and events_content().

datesel_format (   $f)

Referenced by events_content(), and profiles_content().

datetime_convert (   $from = 'UTC',
  $to = 'UTC',
  $s = 'now',
  $fmt = "Y-m-d H:i:s" 
)

Referenced by abook_toggle_flag(), account_verify_password(), advanced_profile(), age(), api_account_rate_limit_status(), api_date(), api_rss_extra(), atom_entry(), attach_delete(), attach_mkdir(), attach_store(), authenticate_success(), build_sync_packet(), cal(), channel_content(), channel_remove(), chat_message(), chatroom_create(), chatroom_enter(), chatroom_flush(), chatsvc_content(), chatsvc_post(), Cache\clear(), consume_feed(), conversation(), create_account(), create_identity(), RedDirectory\createFile(), cronhooks_run(), delete_item_lowlevel(), deliver_run(), directory_run(), dirsearch_content(), dlogger(), dob(), editpost_content(), ev_compare(), event_store_event(), events_content(), events_post(), externals_run(), first_post_date(), fix_system_urls(), format_event_diaspora(), format_event_html(), fsuggest_post(), RedBrowser\generateDirectoryIndex(), get_atom_elements(), get_birthdays(), get_events(), get_feed_for(), get_first_dim(), get_item_elements(), get_mail_elements(), get_profile_elements(), get_public_feed(), Item\get_template_data(), RedDirectory\getLastModified(), RedFile\getLastModified(), import_author_rss(), import_directory_profile(), import_post(), import_site(), import_xchan(), invite_post(), item_post(), item_store(), item_store_update(), items_fetch(), like_content(), list_post_dates(), logger(), magic_init(), mail_content(), mail_post(), mail_store(), manage_content(), message_content(), network_content(), new_contact(), notification(), notifier_run(), onepoll_run(), openid_content(), pagelist_widget(), photo_upload(), photos_post(), ping_init(), poco_load(), poller_run(), post_post(), posted_dates(), profile_photo_post(), profiles_content(), profiles_post(), prune_hub_reinstalls(), RedFile\put(), dba_mysql\q(), dba_mysqli\q(), queue_run(), relative_date(), removeme_post(), photo_driver\save(), send_message(), send_reg_approval_email(), Cache\set(), settings_post(), photo_driver\store(), sync_directories(), tag_deliver(), update_birthdays(), update_directory_entry(), update_modtime(), update_queue_time(), verify_email_address(), webpages_content(), z_birthday(), zot_feed(), zot_process_response(), zot_refresh(), and zotfeed_init().

dob (   $dob)

Referenced by profiles_content().

field_timezone (   $name = 'timezone',
  $label = '',
  $current = 'America/Los_Angeles',
  $help 
)

Referenced by setup_content().

get_dim (   $y,
  $m 
)
get_first_dim (   $y,
  $m 
)

Referenced by cal().

select_timezone (   $current = 'America/Los_Angeles')

Referenced by field_timezone().

timesel (   $pre,
  $h,
  $m 
)

Referenced by events_content().

timezone_cmp (   $a,
  $b 
)
update_birthdays ( )

Create a birthday event for any connections with a birthday in the next 1-2 weeks. Update the year so that we don't create another event until next year.

Referenced by poller_run().

z_birthday (   $dob,
  $tz,
  $format = "Y-m-d H:i:s" 
)

Return the next birthday, converted from the owner's timezone to UTC. This makes it globally portable. If the provided birthday lacks a month and or day, return an empty string. A missing year is acceptable.

Referenced by zfinger_init().