In MySQL the STR_TO_DATE()
function can do the trick in just one line!
Example: We want to get the date of the Tuesday
of the 32
th week of the year 2013
.
SELECT STR_TO_DATE('2013 32 Tuesday', '%X %V %W');
would output:
'2013-08-13'
I think this is the best and shortest solution to your problem.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…