Documentation

Dates

Table of Contents

formatDateLocaleToEn()  : mixed
formats a date from locale format (as specified into language definition) to English format YYYY-MM-DD useful to format user input for saving to database
intervalsOverlap()  : int
Checks whether two date intervals overlaps and returns the number of overlapping days if any

Methods

formatDateLocaleToEn()

formats a date from locale format (as specified into language definition) to English format YYYY-MM-DD useful to format user input for saving to database

protected formatDateLocaleToEn(string $dateLocale) : mixed
Parameters
$dateLocale : string
Return values
mixed

intervalsOverlap()

Checks whether two date intervals overlaps and returns the number of overlapping days if any

protected intervalsOverlap(string $interval1StartDate, string $interval1StopDate, string $interval2StartDate, string $interval2StopDate) : int
Parameters
$interval1StartDate : string

YYYY-MM-DD

$interval1StopDate : string

YYYY-MM-DD

$interval2StartDate : string

YYYY-MM-DD

$interval2StopDate : string

YYYY-MM-DD

Return values
int

number of overlapping days

Search results