luxon Questions
2
Solved
Hi I would like to express a luxon interval in a localized human-readable manner (Eg. 9 days, 3 hours).
I have achieved this starting from present moment. With this code:
DateTime.fromISO(value).to...
Fablan asked 21/8, 2020 at 15:57
3
Solved
Luxon's documentation for the Duration.fromISO method describes it as
Create a Duration from an ISO 8601 duration string
Nowhere is mentioned the ability to create a duration based on two dates. ...
Retirement asked 6/9, 2020 at 10:40
2
Solved
Moment had the option to get the day name based on week number (0 to 6). I see that luxon has day of the week, as number from 1-7 (Monday is 1, Sunday is 7)https://moment.github.io/luxon/#/parsing ...
Linden asked 22/10, 2021 at 14:28
36
How to get the difference between two dates in years, months, and days in JavaScript, like: 10th of April 2010 was 3 years, x month and y days ago?
There are lots of solutions, but they only offer ...
Corvin asked 18/7, 2013 at 20:4
0
Recently, Luxon added support for localized week information. I updated my version of Luxon to the latest release that contains this update, 3.4.4 but when opening up the calendar, the week still s...
Cullis asked 13/11, 2023 at 18:21
2
Using Tabulator 5.4, and trying to allow the user to sort a column that contains dates, I am told in the documentation that
Dependency Required You will need to include the luxon.js library to
use...
Scheld asked 11/2, 2023 at 22:4
3
Solved
I tried to use the luxon library to move away from moment - to translate the 1615065599.426264 timestamp into an ISO date.
According to the Online Epoch Converter this corresponds to
GMT: Saturday...
Nels asked 9/3, 2021 at 19:27
4
Time-picker is showing local timezone, how to change that to desired timezone?
Nunhood asked 1/2, 2019 at 14:1
2
I'm using Luxon to show when orders will be processed. If they place an order after business hours 9am-5pm EST, I want to tell them their order will be ready at 2:00pm EST the following day.
let e...
1
I have UTC dates stored in a collection like so:
"orderBeforeStartTime" : ISODate("2021-03-20T14:00:00.000Z"),
"orderBeforeEndTime" : ISODate("2021-03-20T16:00:00...
Pruritus asked 19/3, 2021 at 16:56
6
Solved
I have two luxon objects,
let startDate = DateTime.fromISO(startDate)
let someDate = DateTime.fromISO(someDate)
How can I compare if someDate is <= startDate, only the dates, without the tim...
Vandal asked 4/2, 2020 at 13:28
2
Solved
With moment.js, you can format a date this way:
const date = moment("2010-10-22T21:38:00");
const data = date.format("LL - LT")
console.log(data)
<script src="https://cdnjs.cloudflare.com/...
Klee asked 25/9, 2020 at 13:13
2
Solved
I've got a TimePicker component that returns a 24-hour time in this format: 09:00 for 9AM or 12:00 for 12PM or 20:00 for 8PM. Something in my code requires a Date (JSDate) so I want to just take th...
Glary asked 6/4, 2021 at 20:53
1
Solved
Is it possible to get the day of the year in the 1-365|366 range from a Luxon DateTime object?
I'm looking for a solution that doesn't involve computing the value. So something similar to DateTime....
Elegiac asked 2/9, 2022 at 6:41
1
Solved
I have trawled the docs, but cannot find a a helper to reset the time of a Luxon DateTime.
I can start with a standard date:
export const getDateOnly = (date: Date = new Date()) => new Date(
da...
Millwater asked 11/7, 2022 at 8:36
2
Solved
I want to generate a Luxon date without taking the Settings.defaultZone into account.
In my case, I got a date string from a third party date picker component. The format is as the following:
201...
Matazzoni asked 4/6, 2019 at 8:28
2
Solved
Moment timezone results with short timezone abbreviations, e.g
moment.tz([2012, 0], 'America/New_York').format('z'); // EST
moment.tz([2012, 5], 'America/New_York').format('z'); // EDT
Is there ...
Contractual asked 26/5, 2020 at 10:26
1
Solved
How can I get the Timestamp from a luxon dateTime object?
For example?
const { DateTime } = require("luxon");
date = DateTime.now().setZone('utc');
date.endOf('day);
console.log(date.??...
Darsey asked 19/8, 2021 at 19:1
2
Solved
Using Luxon JS, I've been trying to format datetime to output in a certain format, using the native toISO function:
This is what I get:
"2018-08-25T09:00:40.000-04:00"
And this is what I...
Cancer asked 5/5, 2021 at 19:4
3
Solved
I'm using the following to get the end of day for a date coming from a date picker:
var date = DateTime.fromISO('2018-05-05').endOf('day');
What I want to end up with is
"2018-05-05T23:59:59+0...
Discourse asked 8/3, 2018 at 10:57
1
Solved
I'm searching a way to get date range from week number with Luxon to replace my 'moment' code.
Today I'm using this code:
m = moment(yearNumber + "-W" + weekNumber);
dateFromStr = moment(...
Siliculose asked 25/3, 2021 at 11:14
1
Solved
I'm building a DatePicker React with the Material-UI picker library and using Luxon as an adapter.
When I change the calendar date I'm getting an object with DateTime as follow:
The code I'm using...
Feininger asked 18/1, 2021 at 13:41
3
I am trying to use js sort of luxon time objects. I am not sure if this is correct as sort expects -1,0,1
const results = objectGroupedByYearMonth[year][month].results.sort(
(a,b) =>
DateTime...
Cytaster asked 12/11, 2020 at 10:17
3
Solved
As the title stated, I want to get the start time and end time of a day for certain timezone and convert them to utc time. Here is my part of my implementation:
//convert current local time to sp...
Bassarisk asked 16/3, 2016 at 9:15
1
Solved
How to generate dates using luxon in the following format
2020-12-03T16:35:40.426+0100
I've tried to use
let format = "yyyy-MM-dd\'T\'HH:mm:ss.SSSZ"
let str = date.toFormat(format)
but ...
Trysail asked 3/12, 2020 at 16:21
1 Next >
© 2022 - 2024 — McMap. All rights reserved.