System\Helpers\DateTime

Overview

DateTime helper


Public Methods

public static listTimezones()

public static listTimezones(): void

public static makeCarbon()

public static makeCarbon($value, $throwException = true): Carbon\Carbon 

makeCarbon converts mixed inputs to a Carbon object.

public static momentFormat()

public static momentFormat(string $format): string 

momentFormat converts a PHP date format to "Moment.js" format.

public static timeSince()

public static timeSince($datetime): string 

timeSince returns a human readable time difference from the value to the current time. Eg: 10 minutes ago

public static timeTense()

public static timeTense($datetime): string 

timeTense returns 24-hour time and the day using the grammatical tense of the current time. Eg: Today at 12:49, Yesterday at 4:00 or 18 Sep 2015 at 14:33.