Function __global->post_param_date_components_utc

Definitions

sources/temporal2.php

  • Sanitise a POST inputted date with a timezone, and get the UTC date components for the inputted date.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$stub ID_TEXT No No required parameter N/A N/A The stub of the parameter name (stub_year, stub_month, stub_day, stub_hour, stub_minute)
$get_also boolean No No False N/A N/A Whether to allow over get parameters also

Returns

  • The date/time components (null: no input date was chosen)
  • Type: ?array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Sanitise a POST inputted date with a timezone, and get the UTC date components for the inputted date.
 *
 * @param  ID_TEXT $stub The stub of the parameter name (stub_year, stub_month, stub_day, stub_hour, stub_minute)
 * @param  boolean $get_also Whether to allow over get parameters also
 * @return ?array The date/time components (null: no input date was chosen)
 */

function post_param_date_components_utc(string $stub, bool $get_also = false) : ?array