Need to refer to dayjs lib

hi,

My code is working well with moment.js.But ,I would like to use dayjs instead of moment.js, since moment is an outdated library.It is not working.pls suggest.

Also noticed that predictDate func changes the date entered by the user.Like if an invalid date like 40 June is entered by the user, predictDate returns to 1st June,2021.Do you have anyother way to identify that its a date, but an invalid one.

Thanks,
Jaya

1 Like

Any update on this pls?

I am writing extra characters because the portal is forcing me to :slight_smile:

1 Like

Hello @Jaya_Banbah,
Can you please share the use-case where you want to use the day.js library?

Also, talking about the dates; best way to use date is via system entity. To use that you can use any of these:

{{prediction.entities.date}} or {{entities.date}}

Hi,

I need to do a lot of computations for date and times.I am using moment.js for now.
But that is an outdated library.

A sample computation is to show time slots available for appointment which are after the current time.These slots are defined as string constants(in Tools).Slot number and time invloved can be updated without modifying code.

Just wanted to clarify about prediction.entities.date.It is correcting the date when user inputs an invalid one.Is this the expected behaviour?