Example #1
0
(date.diff(DateTime.utc()): Duration);
// $ExpectError
(date.diffNow("glom"): Duration);
// $ExpectError
(date.diffNow(["year", "glom"]): Duration);
// $ExpectError
(date.diffNow(["year", "month"], { foo: "bar" }): Duration);

(date.startOf("year"): DateTime);
(date.startOf("month"): DateTime);
(date.startOf("day"): DateTime);
(date.startOf("seconds"): DateTime);
// $ExpectError
(date.startOf("secs"): DateTime);

(date.endOf("year"): DateTime);
(date.endOf("month"): DateTime);
(date.endOf("day"): DateTime);
(date.endOf("seconds"): DateTime);
// $ExpectError
(date.endOf("secs"): DateTime);

if (date.equals(DateTime.utc())) {
}
// $ExpectError
if (date.equals(new Date())) {
}

(date.get("year"): number);
(date.get("month"): number);
// $ExpectError