Open Journal Systems  3.3.0
Seboettg\CiteProc\Util\DateHelper Class Reference

Static Public Member Functions

static getSortKeyDate ($dataItem, $key)
 
static hasDateRanges ($items, $variable, $match="all")
 
static parseDateParts ($date)
 
static serializeDate ($dateParts)
 

Detailed Description

Definition at line 26 of file DateHelper.php.

Member Function Documentation

◆ getSortKeyDate()

static Seboettg\CiteProc\Util\DateHelper::getSortKeyDate (   $dataItem,
  $key 
)
static

creates sort key for variables containing date and date ranges

Parameters
array$dataItem
Key$key
Returns
string
Exceptions
CiteProcException

Definition at line 75 of file DateHelper.php.

◆ hasDateRanges()

static Seboettg\CiteProc\Util\DateHelper::hasDateRanges (   $items,
  $variable,
  $match = "all" 
)
static
Parameters
array$items
string$variablename of the date variable
string$match("all"|"any") default "all"
Returns
bool

Definition at line 104 of file DateHelper.php.

◆ parseDateParts()

static Seboettg\CiteProc\Util\DateHelper::parseDateParts (   $date)
static
Parameters
$date
Returns
array
Exceptions
CiteProcException

Definition at line 53 of file DateHelper.php.

◆ serializeDate()

static Seboettg\CiteProc\Util\DateHelper::serializeDate (   $dateParts)
static

dates: Date variables called via the variable attribute are returned in the YYYYMMDD format, with zeros substituted for any missing date-parts (e.g. 20001200 for December 2000). As a result, less specific dates precede more specific dates in ascending sorts, e.g. “2000, May 2000, May 1st 2000”. Negative years are sorted inversely, e.g. “100BC, 50BC, 50AD, 100AD”. Seasons are ignored for sorting, as the chronological order of the seasons differs between the northern and southern hemispheres.

Parameters
array$dateParts
Returns
string

Definition at line 39 of file DateHelper.php.


The documentation for this class was generated from the following file: