Class MatukioHelperDate

since 1.0.0
package MatukioEvents

 Methods

Calculate count of days

calculateCount(\DateTime $begin, \DateTime $until, string $type, array $week_day, array $month_week) : float | integer
Static

Parameters

$begin

\DateTime
  • The begin

$until

\DateTime
  • Until when

$type

string
  • The type

$week_day

array
  • The days array

$month_week

array
  • The weeks array

Returns

floatinteger

Convert a PHP Date Format into the Joomla calendar one.

convertPhpDatetoCalendar(string $dateFormat) : string
Static

. Very weird format, following calendar.js

since 7.0.0

Parameters

$dateFormat

string

The PHP Date format

Returns

string

The difference in weeks

datediffInWeeks(\DateTime $first, \DateTime $second) : float
Static

Parameters

$first

\DateTime
  • The first date

$second

\DateTime
  • The second date

Returns

float

Gets the current date (toSQL)

getCurrentDate() : string
Static

Returns

string

Get the a date (only date, no time) input

getDateInput(string $name, string $value = '', null $format = null, null $id = null, string $cssClass = 'co-date') : mixed
Static
since 7.0.0

Parameters

$name

string

Name of the element

$value

string

Value of the element

$format

null

Format of the element

$id

null

Id of the element

$cssClass

string

CSS Classes for this Input Element

Returns

mixed

Get the a date and time input

getDateTimeInput(string $name, string $value = '', $required = true, null $format = null, null $id = null, string $cssClass = 'co-date') : mixed
Static
since 7.0.0

Parameters

$name

string

Name of the element

$value

string

Value of the element

$required

$format

null

Format of the element

$id

null

Id of the element

$cssClass

string

CSS Classes for this Input Element

Returns

mixed

Gets the timezone

getTimezone(\Date $date) : string
Static

Parameters

$date

\Date

The date Obj

Returns

string