SEARCH:
Previous: dMonthEnd Next: dMonthFromNum

dEnsureTS

unix_ts/string date
unix_ts

Accepts a variable and returns a unix timestamp. If the value passed in is a number, the number is returned unchanged. If the value is a string, it is converted via strtotime.

Useful for writing resilient code when input values are not reliably one or the other.

Previous: dMonthEnd Next: dMonthFromNum