back to Overview

_.dateMidnight()

Returns a new Date object with the same calendar date, but at midnight in the current time zone.
Util module only.

Syntax Variants

_.dateMidnight()
_.dateMidnight(date)

Parameters

date (optional)
the Date. If omitted, the current date is used.
(return value)
a new Date representing midnight in the current time zone

Description

Returns a new Date object with the same calendar date, but at midnight in the current time zone. If no parameter is given, it returns the current day at midnight.

Comments

comments powered by Disqus

back to Overview

Functions