class DateHelper

Methods

static string
formatForJson(DateTimeImmutable $dt)

Unfortunately PHP has no easy way to create a nice, ISO 8601 formatted date string with milliseconds and Z as the time zone specifier. Thus this hack.

Details

at line 19
static string formatForJson(DateTimeImmutable $dt)

Unfortunately PHP has no easy way to create a nice, ISO 8601 formatted date string with milliseconds and Z as the time zone specifier. Thus this hack.

Parameters

DateTimeImmutable $dt

Return Value

string ISO 8601 formatted date