Day of week

Hello!
Could somebody tell me how can I change first day of week from Sunday to Monday?
I have tried to add Locale parameters. But it doesn’t work.

@Temza Could you please try this code

<cfscript>
  function Mydayofweek(date, day_1)
  {   
     return (((DayOfWeek(date) + (7 -day_1)) MOD 7) +1);
  } 
  writeDump(Mydayofweek(now(),2));
</cfscript>

you need to use the locale aware version?

Thanks. But it doesn’t work too. I think it only for local names of month or day. I’ve tried many options. But still.

Thanks a lot. It works.

1 Like