Jump to content

month name from week number


tkm

Recommended Posts

That code gives you the first day of that week. You then add another 6 days to get the last day of the week, and then get the month name again. If they are different, you know the week spans two months.

 

Alternatively, you could see if the day of month + 6 is more than the number of days in the month. That way you can delay working out the month name a second time, in case you don't need to. But it's probably not a real performance issue, anyway.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.