[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/date/help/ -> date-api-functions.html (source)

   1  <h3>Preconfigured arrays</h3>
   2  <p>
   3  Both translated and untranslated values are available. The date_week_days_ordered()
   4  function will shift an array of week day names so it starts with the site's
   5  first day of the week, otherwise the weekday names start with Sunday as the first
   6  value, the expected order for many php and sql functions.
   7  </p>
   8  <ul style="color: rgb(0, 0, 187);">
   9  <li>
  10  date_month_names();
  11  </li><li>
  12  date_month_names_abbr();
  13  </li><li>
  14  date_month_names_untranslated();
  15  </li><li>
  16  date_week_days();
  17  </li><li>
  18  date_week_days_abbr();
  19  </li><li>
  20  date_week_days_untranslated();
  21  </li><li>
  22  date_week_days_ordered();
  23  </li><li>
  24  date_years();
  25  </li><li>
  26  date_hours();
  27  </li><li>
  28  date_minutes();
  29  </li><li>
  30  date_seconds();
  31  </li><li>
  32  date_timezone_names();
  33  </li><li>
  34  date_ampm();
  35  </li>
  36  </ul>
  37  
  38  <h3>Miscellaneous date manipulation functions </h3>
  39  <p>
  40  Pre-defined constants and functions that will handle pre-1970 and post-2038 
  41  dates in both PHP 4 and PHP 5, in any OS. Dates can be converted from one 
  42  type to another and date parts can be extracted from any date type.
  43  </p>
  44  <ul style="color: rgb(0, 0, 187);">
  45  <li>
  46  DATE_DATETIME
  47  </li><li>
  48  DATE_ISO
  49  </li><li>
  50  DATE_UNIX
  51  </li><li>
  52  DATE_ARRAY
  53  </li><li>
  54  DATE_OBJECT
  55  </li><li>
  56  DATE_ICAL
  57  </li><li>
  58  date_convert()
  59  </li><li>
  60  date_is_valid();
  61  </li><li>
  62  date_part_is_valid();
  63  </li><li>
  64  date_part_extract();
  65  </li>
  66  </ul>
  67  
  68  <h3>Date calculation and navigation</h3>
  69  <p>
  70  date_diff() will find the time difference between any two days, measured
  71  in seconds, minutes, hours, days, months, weeks, or years.
  72  </p>
  73  
  74  <ul style="color: rgb(0, 0, 187);">
  75  <li>
  76  date_days_in_month();
  77  </li><li>
  78  date_days_in_year();
  79  </li><li>
  80  date_weeks_in_year();
  81  </li><li>
  82  date_last_day_of_month();
  83  </li><li>
  84  date_day_of_week();
  85  </li><li>
  86  date_day_of_week_name();
  87  </li><li>
  88  date_diff();
  89  </li>
  90  </ul>
  91  
  92  <h3>Date regex and format helpers </h3>
  93  <p>
  94  Pre-defined constants, an array of date format strings and their 
  95  equivalent regex strings.
  96  </p>
  97  <p>
  98  DATE_REGEX_LOOSE is a very loose regex that will pull date parts out
  99  of an ISO date with or without separators, using either 'T' or a space
 100  to separate date and time, and with or without time.
 101  </p>
 102  <p>
 103  date_format_date() is similar to format_date(), except it takes a 
 104  date object instead of a timestamp as the first parameter.
 105  </p>
 106  
 107  <ul style="color: rgb(0, 0, 187);">
 108  <li>
 109  DATE_FORMAT_ISO
 110  </li><li>
 111  DATE_FORMAT_DATETIME
 112  </li><li>
 113  DATE_FORMAT_UNIX
 114  </li><li>
 115  DATE_FORMAT_ICAL
 116  </li><li>
 117  
 118  DATE_REGEX_ISO
 119  </li><li>
 120  DATE_REGEX_DATETIME
 121  </li><li>
 122  DATE_REGEX_LOOSE
 123  </li><li>
 124  
 125  date_format_date();
 126  </li><li>
 127  date_t()
 128  </li><li>
 129  date_short_formats();
 130  </li><li>
 131  date_medium_formats();
 132  </li><li>
 133  date_long_formats();
 134  </li><li>
 135  date_format_patterns();
 136  </li>
 137  </ul>


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7