Function __global->staff_checklist_time_ago_and_due

Definitions

sources/blocks/main_staff_checklist.php

  • Work out when an action should happen, and last happened.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$seconds_ago ?integer No No required parameter N/A N/A The number of seconds ago since it last happened (null: never happened) OR If $recur_hours is null then the number of seconds until it happens (null: won't happen)
$recur_hours ?integer No No Null N/A N/A It should be done every this many hours (null: never happened)

Returns

  • A pair: Tempcode to display, and the number of seconds to go until the action should happen
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Work out when an action should happen, and last happened.
 *
 * @param  ?integer $seconds_ago The number of seconds ago since it last happened (null: never happened) OR If $recur_hours is null then the number of seconds until it happens (null: won't happen)
 * @param  ?integer $recur_hours It should be done every this many hours (null: never happened)
 * @return array A pair: Tempcode to display, and the number of seconds to go until the action should happen
 */

function staff_checklist_time_ago_and_due(?int $seconds_ago, ?int $recur_hours = null) : array