i need to display a liste of time based on specific date (getTimeListByDate)
i need this logic because in Europe time zone we have a changed hours each year in last week of march or october (the last week changed in each year )
- Returns the correct list of hours and minutes based on the selected date.
- For a given date, starting from the year, we find the DST dates for March and October.
- If the given day parameter corresponds to March, then we return 23 hours. If
- the day corresponds to October, then we return 25 hours; otherwise, we are in the normal mode of 24 hours.
i can say that i need to Generates the lists of hours and minutes with the DST indication as *.
- Can generate the list for the date of the time change
- at the end of March, where we will have 23 hours, with a time jump from 01:59 to 03:00. For this, specify month 2 and dst : *
- at the end of October: we have 25 hours, with the transition from 02:59 to 02:59*, so two times 02 hours. Specify month 9 and dst : *
- On normal days, month does not matter, and dst : ” step 1last week of each year of october last week of each year of march
i worked with angular material and i use a function that return the marsOctobreDstDates when i pass the moment().year() to get the DateDSTByYear() then i use so much code.
i need to know is there a package that can give me the result that i need to avoid write more much code in ts file to do that.
Hugo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.