You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have
start = 04.02.2020
end = 1.03.2020 or 2.03.2020 or 3.03.2020
const range = moment.range(start, end)
When I do console.log(range) - it's ok
But then
let months = Array.from(range.by('months')).map(m => m.format('MMM'))
let days = Array.from(range.by('days')).map(m => m.format('DD MMM YYYY'))
at the end:
months = ['feb.'] - wrong
days = [04.02.2020 , ....] - it's ok
Even if I do
let months = Array.from(range.by('months', {excludeEnd: false})).map(m => m.format('MMM'))
at the end: months = ['feb.'] - wrong
But if
2)
start = 01.02.2020
end = 1.03.2020 or 2.03.2020 or 3.03.2020
at the end: months = ['feb.', 'mart'] - ok
What should I do to make 1 work?
It's my false or no?
The text was updated successfully, but these errors were encountered:
Hello!
start = 04.02.2020
end = 1.03.2020 or 2.03.2020 or 3.03.2020
const range = moment.range(start, end)
When I do console.log(range) - it's ok
But then
let months = Array.from(range.by('months')).map(m => m.format('MMM'))
let days = Array.from(range.by('days')).map(m => m.format('DD MMM YYYY'))
at the end:
months = ['feb.'] - wrong
days = [04.02.2020 , ....] - it's ok
Even if I do
let months = Array.from(range.by('months', {excludeEnd: false})).map(m => m.format('MMM'))
at the end: months = ['feb.'] - wrong
But if
2)
start = 01.02.2020
end = 1.03.2020 or 2.03.2020 or 3.03.2020
at the end: months = ['feb.', 'mart'] - ok
What should I do to make 1 work?
It's my false or no?
The text was updated successfully, but these errors were encountered: