How to sort date with out moment library

How to sort date with out moment library

KRANTHI2210KRANTHI2210 Posts: 1Questions: 1Answers: 0

hi, I am using Dynamic data in my scenario, for that how to sort the date field with out using moment library. please find below my json data.

[{"HolidayDate":"26-Jan-2023","HolidayName":"Republic day","IsPastData":1},{"HolidayDate":"07-Apr-2023","HolidayName":"Good Friday","IsPastData":1},{"HolidayDate":"01-May-2023","HolidayName":"Labour's Day","IsPastData":1},{"HolidayDate":"08-May-2023","HolidayName":"Good Friday","IsPastData":1}]

Answers

  • colincolin Posts: 15,112Questions: 1Answers: 2,583

    You would need to use moment or Luxon there as the dates are in a non-standard format - these examples demonstrate how to do that (take a look at the final two).

    If there a reason why you don't want to use moment?

    Colin

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    There is actually this plug-in from a while back which I think would suit your needs.

    Allan

Sign In or Register to comment.