The datetime_convert_from_date block has most of the time a timestamp as input:
Which generates this code:
At the start we have 2 times a new Date, because the timestamp block generates already a Data object instance (as new Date() ).
Would like to avoid this by putting in the code generator something like this:
IF input connected to an output that has type 'Date'
Just use the input
ELSE
put an extra new Date( .. ) around it
But need some feedback first from the Blockly forum to get this solved:
The datetime_convert_from_date block has most of the time a timestamp as input:
Which generates this code:
At the start we have 2 times a
new Date
, because the timestamp block generates already a Data object instance (asnew Date()
).Would like to avoid this by putting in the code generator something like this: IF input connected to an output that has type 'Date' Just use the input ELSE put an extra new Date( .. ) around it
But need some feedback first from the Blockly forum to get this solved: