moment / luxon

⏱ A library for working with dates and times in JS
https://moment.github.io/luxon
MIT License
15.26k stars 731 forks source link

In Firefox DateTime.now() returns invalid value #1423

Closed jira-zz closed 1 year ago

jira-zz commented 1 year ago

In Firefox luxon.DateTime.now().isValid is false.

image

diesieben07 commented 1 year ago

I cannot reproduce this in Firefox 112.0.1 with Luxon 3.3.0 using the following test:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Luxon test case</title>
  <script src="https://cdn.jsdelivr.net/npm/luxon@3.3.0/build/global/luxon.min.js"></script>
</head>
<body>
  <script>
    const dt = luxon.DateTime.now();
    console.log(dt.isValid);
  </script>
</body>
</html>

Can you please provide additional details?

jira-zz commented 1 year ago

I used datejs on my page. Removing it solved the problem. Strange is, it worked in Chrome but not in FF. Anyway problem solved.