I have string data in the format "hh:mm" e.g. 05:00. I want it in Milliseconds e.g 1800000 console.log(DateTime.fromISO("05:00") and i get the following output: 1654574400000 but what i want it in seconds so i can compare it against a different value. I have tried putting .toMillis() at the end console.log(DateTime("05:00")).toMillis(); and it comes back with… Read More Converting unix timestamp to Milliseconds in luxon.js
I’m trying to obtain the Duration (or start and end dates) of an arbitrary ‘quarter’ in Luxon. For example, suppose I want the beginning and ending dates of the 3rd quarter knowing only the quarter: const quarterInQuestion = 3; const startDateOfQuarter = DateTime.fromFormat(quarterInQuestion.toString(), ‘q’); This will give me the start date of the quarter, but… Read More Obtain Duration of a quarter in Luxon
I am using luxon for my app. I have some undefined date. I validate my date with luxon‘s isDateTime and function returns string. I used this function multiple places of the app. Most of the places I am passing date string and only places I am getting undefined date. I manage to silent the Typescript… Read More Typescript undefined date validation
I’m trying to wrap my head in understanding the implication of using .utcnow vs .now on Python’s datetime. Here’s the reason of my confusion: I live in France. Right now, we have a +1 hour on the UTC timezone (CET timezone in winter (now) / CEST (+2) timezone in summer). If I take the following… Read More Python datetime utcnow vs Luxon Datetime.fromMillis?