From e0c8f874304cd4ecc3944bdcff3d8f8c27102a18 Mon Sep 17 00:00:00 2001 From: Enric Bisbe Gil Date: Thu, 20 May 2021 16:57:39 +0200 Subject: [PATCH] .toSeconds() returns seconds.milliseconds (#944) As explained on https://github.com/moment/luxon/issues/565 .toSeconds() returns seconds.milliseconds to mimic UNIX system behaviour. --- docs/formatting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/formatting.md b/docs/formatting.md index 930ab43c9..c7320a611 100644 --- a/docs/formatting.md +++ b/docs/formatting.md @@ -36,7 +36,7 @@ DateTime objects can also be converted to numerical [Unix timestamps](https://en ```js dt.toMillis(); //=> 1492702320000 -dt.toSeconds(); //=> 1492702320 +dt.toSeconds(); //=> 1492702320.000 dt.valueOf(); //=> 1492702320000, same as .toMillis() ```