Home  >  Q&A  >  body text

The start and end days of the weekend for each culture

https://en.wikipedia.org/wiki/Workweek_and_weekend (The table on this page lists the working days for each country).

Is there a way to get the weekends for each culture code in Typescript/Javascript? Most are Saturday-Sunday, but there are some exceptions...i.e. Mexico = Sunday only, some Middle Eastern countries = Friday-Saturday, etc. If possible I would like to get the start and end days of the weekend for each culture. moment.js doesn't seem to have this functionality (and there is a weekday library based on moment , but that library seems to be Saturday-Sunday friendly).

P粉852578075P粉852578075403 days ago455

reply all(1)I'll reply

  • P粉281089485

    P粉2810894852023-09-13 09:14:55

    Intl.DateTimeFormat

    See especially .getWeekInfo ()

    reply
    0
  • Cancelreply