I have a string containing days of the week:
Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
It can be also:
Monday, Tuesday
Also:
Thursday, Friday, Saturday
What I want to achieve is if more than 2 days are consecutive to "merge" them and display like: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday - will be Monday - Sunday; Monday, Tuesday - will stay like that; Thursday, Friday, Saturday - Thursday - Saturday.
I want to use only moment.js or javascript without other plugins (like range). Thanks in advance!
moment.js
for? Not seeing any dates, just a simplestring
? – goto1