Duration dont work on 2026.0.0

Hi scilab team i tried following on windows and it gaves me errors

and just duration does not work anymore

duration(“00:00:26.310”,“hh:mm:ss.SSS”,“hh:mm:ss.SSS”)

duration: Unknown option “hh:mm:ss.SSS”.

what do i do wrong?

Hello Pascal, it seems you double pasted the format in 2nd argument position instead indicating inputformat option :

→ duration(“00:00:26.310”,“InputFormat”, “hh:mm:ss.SSS”)

ans = [duration]

00:00:26.310

David

yes i did, but there was another error whilst i had blanks but still. should there be a problem, if both input and output are the same, should it not be recognised as it is?

Hello @pascal

Can you send an example to reproduce the problem?

Best regards.

its more a philosophical question, should it not know that there is an input and an output format, and if both are the same, it should not care?
duration(“00:00:26.310”,“hh:mm:ss.SSS”,“hh:mm:ss.SSS”)

There is no philosophical question here, this is a misuse of duration, as the valid syntaxes are well defined (see duration - Create a duration - duration in hours, minutes and seconds)

d = duration(h, m, s)
d = duration(h, m, s, ms)
d = duration(x)
d = duration(str)
d = duration(str, "InputFormat", inputFormat)
d = duration(..., "OutputFormat", outputFormat)
1 Like

Ah, yes, now I see, it’s the placement of command and format twice of input and output.

Thanks, Pascal