Convert week number to a date

Hi,

Is anyone aware of an extension that will convert week number and year to a date ?
eg - 17 (year) 40 (week) = 8 October 2017 (last day of that week)

Or even an algorithm to calculate it.

Cheers
Steve

You could throw one of these at a webviewer, run javascript, and get output back with the webviewstring

Probably quicker than trying to use just blocks and the clock component.

Try this draggable procedure:

Here is my test:
last_date_of_week_test

P.S. There will probably be a surprise when you ask for week 53, and the last date is in the next year. Should it be clipped to the starting year end?

Hmmmm

Day on which week starts (e.g here, Monday):

var weekyear = window.AppInventor.getWebViewString();
var week = weekyear.split(",")[0]; 
var year = weekyear.split(",")[1]; 
var date = new Date(year, 0, (1 + (week - 1) * 7)); 
date.setDate(date.getDate() + (1 - date.getDay())); 
window.AppInventor.setWebViewString(JSON.stringify(date));

Date:

var weekyear = window.AppInventor.getWebViewString(); 
var week = weekyear.split(",")[0]; 
var year = weekyear.split(",")[1]; 
var weekdate = (1 + (week - 1) * 7); 
date = new Date(year,0,weekdate); 
window.AppInventor.setWebViewString(JSON.stringify(date));

Perfect as is ....its calculating as manufacture date so is best with week 53 into the next year.